diff --git a/io.c b/io.c index 0be6b24a6f..4f98031c40 100644 --- a/io.c +++ b/io.c @@ -204,6 +204,9 @@ rb_update_max_fd(int fd) } } +#undef HAVE_FCNTL +#undef O_CLOEXEC + void rb_maygvl_fd_fix_cloexec(int fd) { diff --git a/signal.c b/signal.c index c42ce0aee0..d3c7cb8f32 100644 --- a/signal.c +++ b/signal.c @@ -1261,7 +1261,9 @@ install_sighandler(int signum, sighandler_t handler) rb_enable_interrupt(); return 0; } -#define install_sighandler(signum, handler) (install_sighandler(signum, handler) ? rb_bug(#signum) : (void)0) +#ifndef __native_client__ +# define install_sighandler(signum, handler) (install_sighandler(signum, handler) ? rb_bug(#signum) : (void)0) +#endif #if defined(SIGCLD) || defined(SIGCHLD) static int @@ -1281,7 +1283,9 @@ init_sigchld(int sig) rb_enable_interrupt(); return 0; } -#define init_sigchld(signum) (init_sigchld(signum) ? rb_bug(#signum) : (void)0) +# ifndef __native_client__ +# define init_sigchld(signum) (init_sigchld(signum) ? rb_bug(#signum) : (void)0) +# endif #endif void