From 535a55ec9eff83ac1cdf58a6514f4a76cab46a57 Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Tue, 23 Aug 2011 20:39:45 +0200 Subject: [PATCH] configure: Add GNU/kFreeBSD detection. --- configure | 2 +- configure.ac | 2 +- libs/wine/ldt.c | 2 +- tools/winebuild/main.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 1c453cf1465..1497bdb82d4 100755 --- a/configure +++ b/configure @@ -6854,7 +6854,7 @@ eval ac_res=\$$as_ac_var $as_echo "$ac_res" >&6; } if test `eval 'as_val=${'$as_ac_var'};$as_echo "$as_val"'` = yes; then : case $host_os in - freebsd*) LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x60000400" ;; + freebsd* | kfreebsd*-gnu) LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x60000400" ;; *) LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400" ;; esac diff --git a/configure.ac b/configure.ac index e6bbb2aec4c..11d22b99699 100644 --- a/configure.ac +++ b/configure.ac @@ -824,7 +824,7 @@ case $host_os in *i[[3456789]]86* | x86_64) WINE_TRY_CFLAGS([-Wl,--section-start,.interp=0x7bf00400], [case $host_os in - freebsd*) LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x60000400" ;; + freebsd* | kfreebsd*-gnu) LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x60000400" ;; *) LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400" ;; esac ]) diff --git a/libs/wine/ldt.c b/libs/wine/ldt.c index 30980615d2a..4e48b160b98 100644 --- a/libs/wine/ldt.c +++ b/libs/wine/ldt.c @@ -384,7 +384,7 @@ unsigned short wine_ldt_alloc_fs(void) if (errno != ENOSYS) perror( "set_thread_area" ); } else global_fs_sel = (ldt_info.entry_number << 3) | 3; -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined (__FreeBSD_kernel__) global_fs_sel = GSEL( GUFS_SEL, SEL_UPL ); #endif } diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c index 55908d58689..0eeeb041eca 100644 --- a/tools/winebuild/main.c +++ b/tools/winebuild/main.c @@ -65,7 +65,7 @@ enum target_cpu target_cpu = CPU_ARM; #ifdef __APPLE__ enum target_platform target_platform = PLATFORM_APPLE; -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) enum target_platform target_platform = PLATFORM_FREEBSD; #elif defined(__sun) enum target_platform target_platform = PLATFORM_SOLARIS;