diff options
-rw-r--r-- | shared/common/mifi.c | 3 | ||||
-rw-r--r-- | shared/shared.h | 3 | ||||
-rw-r--r-- | shared/unstable/loader.c | 9 |
3 files changed, 10 insertions, 5 deletions
diff --git a/shared/common/mifi.c b/shared/common/mifi.c index e3da3fe..c0a7178 100644 --- a/shared/common/mifi.c +++ b/shared/common/mifi.c @@ -15,7 +15,8 @@ #include "m_pd.h" #include "mifi.h" -#ifdef __linux__ +/* this is for GNU/Linux and also Debian GNU/Hurd and GNU/kFreeBSD */ +#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(__GLIBC__) #include <sys/types.h> #ifndef uint32 typedef u_int32_t uint32; diff --git a/shared/shared.h b/shared/shared.h index 73e84e2..7809fb6 100644 --- a/shared/shared.h +++ b/shared/shared.h @@ -25,7 +25,8 @@ typedef unsigned long shared_t_bitmask; -#ifdef __linux__ +/* this is for GNU/Linux and also Debian GNU/Hurd and GNU/kFreeBSD */ +#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(__GLIBC__) #include <sys/types.h> #ifndef int32 typedef int32_t int32; diff --git a/shared/unstable/loader.c b/shared/unstable/loader.c index 4872500..e8ca544 100644 --- a/shared/unstable/loader.c +++ b/shared/unstable/loader.c @@ -5,7 +5,8 @@ /* This is just a not-yet-in-the-API-sys_load_lib() duplication (modulo differentiating the error return codes). LATER use the original. */ -#ifdef __linux__ +/* this is for GNU/Linux and also Debian GNU/Hurd and GNU/kFreeBSD */ +#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(__GLIBC__) #include <dlfcn.h> #endif #ifdef UNIX @@ -39,7 +40,8 @@ static char sys_dllextent[] = ".pd_irix5"; #endif #endif -#ifdef __linux__ +/* this is for GNU/Linux and also Debian GNU/Hurd and GNU/kFreeBSD */ +#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(__GLIBC__) ".pd_linux"; #endif #ifdef MACOSX @@ -76,7 +78,8 @@ static int unstable_doload_lib(char *dirname, char *classname) strcpy(symname + (strlen(symname) - 1), "_tilde"); /* and append _setup to form the C setup function name */ strcat(symname, "_setup"); -#ifdef __linux__ +/* this is for GNU/Linux and also Debian GNU/Hurd and GNU/kFreeBSD */ +#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(__GLIBC__) dlobj = dlopen(filename, RTLD_NOW | RTLD_GLOBAL); if (!dlobj) { |