--- libswirl/linux/common.cpp.orig 2020-10-18 11:22:48 UTC +++ libswirl/linux/common.cpp @@ -22,6 +22,12 @@ #include #if HOST_OS == OS_DARWIN #import + #elif defined(__FreeBSD__) + #include + #include + #include + #include + #include #else #include #endif @@ -33,7 +39,7 @@ #include #include #include -#if !defined(TARGET_BSD) && !defined(TARGET_IPHONE) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) && !defined(TARGET_OSX) && !defined(TARGET_OSX_X64) +#if !defined(__FreeBSD__) && !defined(TARGET_BSD) && !defined(TARGET_IPHONE) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) && !defined(TARGET_OSX) && !defined(TARGET_OSX_X64) #include #include #endif @@ -294,7 +300,7 @@ void enable_runfast() } void linux_fix_personality() { - #if !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_OS_MAC) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) + #if !defined(__FreeBSD__) && !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_OS_MAC) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) printf("Personality: %08X\n", personality(0xFFFFFFFF)); personality(~READ_IMPLIES_EXEC & personality(0xFFFFFFFF)); printf("Updated personality: %08X\n", personality(0xFFFFFFFF)); @@ -302,7 +308,7 @@ void linux_fix_personality() { } void linux_rpi2_init() { -#if !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) && defined(TARGET_VIDEOCORE) +#if !defined(__FreeBSD__) && !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) && defined(TARGET_VIDEOCORE) void* handle; void (*rpi_bcm_init)(void);