diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index ee78aeca158..6165082a78c 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -1173,7 +1173,7 @@ void fill_cpu_info(void) fclose(f); } } -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined (__FreeBSD_kernel__) { int ret, num; size_t len; diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index f30a617b3d1..aff45096a2b 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -210,6 +210,8 @@ typedef struct trapframe SIGCONTEXT; #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#include + typedef struct sigcontext SIGCONTEXT; #define EAX_sig(context) ((context)->sc_eax) @@ -428,7 +430,7 @@ extern void DECLSPEC_NORETURN __wine_restore_regs( const CONTEXT *context ); enum i386_trap_code { TRAP_x86_UNKNOWN = -1, /* Unknown fault (TRAP_sig not defined) */ -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) +#if defined(__FreeBSD__) || defined (__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) TRAP_x86_DIVIDE = T_DIVIDE, /* Division by zero exception */ TRAP_x86_TRCTRAP = T_TRCTRAP, /* Single-step exception */ TRAP_x86_NMI = T_NMI, /* NMI interrupt */ diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index 48f8b6d4a0a..480710398a6 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -136,7 +136,7 @@ extern int arch_prctl(int func, void *ptr); #define FPU_sig(context) ((XMM_SAVE_AREA32 *)((context)->uc_mcontext.fpregs)) -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined (__FreeBSD_kernel__) #include #define RAX_sig(context) ((context)->uc_mcontext.mc_rax) @@ -2335,7 +2335,7 @@ void signal_init_thread( TEB *teb ) #if defined __linux__ arch_prctl( ARCH_SET_GS, teb ); -#elif defined __FreeBSD__ +#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__) amd64_set_gsbase( teb ); #else # error Please define setting %gs for your architecture