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;