--- lib/interception/interception.h.orig 2016-09-16 07:02:18.000000000 +1000 +++ lib/interception/interception.h 2020-05-26 09:41:25.406907000 +1000 @@ -16,7 +16,7 @@ #define INTERCEPTION_H #if !defined(__linux__) && !defined(__FreeBSD__) && \ - !defined(__APPLE__) && !defined(_WIN32) + !defined(__APPLE__) && !defined(_WIN32) && !defined(__BSDSUniX__) # error "Interception doesn't work on this operating system." #endif @@ -129,11 +129,11 @@ extern "C" ret_type func(__VA_ARGS__); # define DECLARE_WRAPPER_WINAPI(ret_type, func, ...) \ extern "C" __declspec(dllimport) ret_type __stdcall func(__VA_ARGS__); -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__BSDSUniX__) # define WRAP(x) __interceptor_ ## x # define WRAPPER_NAME(x) "__interceptor_" #x # define INTERCEPTOR_ATTRIBUTE __attribute__((visibility("default"))) -// FreeBSD's dynamic linker (incompliantly) gives non-weak symbols higher +// FreeBSD's (and BSDSUniX) dynamic linker (incompliantly) gives non-weak symbols higher // priority than weak ones so weak aliases won't work for indirect calls // in position-independent (-fPIC / -fPIE) mode. # define DECLARE_WRAPPER(ret_type, func, ...) \ @@ -241,7 +241,7 @@ #define INCLUDED_FROM_INTERCEPTION_LIB -#if defined(__linux__) || defined(__FreeBSD__) +#if defined(__linux__) || defined(__FreeBSD__) || defined(__BSDSUniX__) # include "interception_linux.h" # define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_LINUX_OR_FREEBSD(func) # define INTERCEPT_FUNCTION_VER(func, symver) \ --- lib/interception/interception_linux.cc.orig 2014-02-24 19:37:41.000000000 +1100 +++ lib/interception/interception_linux.cc 2020-05-26 09:49:58.813819000 +1000 @@ -12,7 +12,7 @@ // Linux-specific interception methods. //===----------------------------------------------------------------------===// -#if defined(__linux__) || defined(__FreeBSD__) +#if defined(__linux__) || defined(__FreeBSD__) || defined(__BSDSUniX__) #include "interception.h" #include // for dlsym() and dlvsym() @@ -33,4 +33,4 @@ } // namespace __interception -#endif // __linux__ || __FreeBSD__ +#endif // __linux__ || __FreeBSD__ || __BSDSUniX__ --- lib/interception/interception_linux.h.orig 2015-09-23 07:34:44.000000000 +1000 +++ lib/interception/interception_linux.h 2020-05-26 09:52:04.915460000 +1000 @@ -12,7 +12,7 @@ // Linux-specific interception methods. //===----------------------------------------------------------------------===// -#if defined(__linux__) || defined(__FreeBSD__) +#if defined(__linux__) || defined(__FreeBSD__) || defined(__BSDSUniX__) #if !defined(INCLUDED_FROM_INTERCEPTION_LIB) # error "interception_linux.h should be included from interception library only" @@ -44,4 +44,4 @@ #endif // !defined(__ANDROID__) #endif // INTERCEPTION_LINUX_H -#endif // __linux__ || __FreeBSD__ +#endif // __linux__ || __FreeBSD__ || __BSDSUniX__