diff --git a/mono/io-layer/shared.c b/mono/io-layer/shared.c index 9e70e8c5aec0..ed9bb1fb2117 100644 --- a/mono/io-layer/shared.c +++ b/mono/io-layer/shared.c @@ -18,7 +18,7 @@ #include #include -#ifdef HAVE_SYS_SEM_H +#if defined(HAVE_SYS_SEM_H) && !(defined(__native_client__) && defined(__GLIBC__)) # include #else # define DISABLE_SHARED_HANDLES diff --git a/mono/mini/wapihandles.c b/mono/mini/wapihandles.c index c873a1d243b8..c2a31ce1ea35 100644 --- a/mono/mini/wapihandles.c +++ b/mono/mini/wapihandles.c @@ -3,7 +3,7 @@ #include "mini.h" -#if defined(HOST_WIN32) || !defined(HAVE_SYS_IPC_H) || !defined(HAVE_SYS_SEM_H) +#if defined(HOST_WIN32) || !defined(HAVE_SYS_IPC_H) || !defined(HAVE_SYS_SEM_H) || (defined(__native_client__) && defined(__GLIBC__)) int mini_wapi_hps (int argc, char **argv) { diff --git a/mono/utils/mono-dl.c b/mono/utils/mono-dl.c index 2b9d518f4b06..48dd29cf9eb0 100644 --- a/mono/utils/mono-dl.c +++ b/mono/utils/mono-dl.c @@ -315,6 +315,12 @@ mono_dl_open (const char *name, int flags, char **error_msg) MonoDlFallbackHandler *dl_fallback = NULL; int lflags = LL_SO_TRFLAGS (flags); +#if defined(__native_client__) && defined(__GLIBC__) + if (error_msg) + *error_msg = g_strdup ("No mono_dl_open for NaCl"); + return NULL; +#endif + if (error_msg) *error_msg = NULL;