diff --git a/src/unix/linux-syscalls.h b/src/unix/linux-syscalls.h index 195a981d..ba44974a 100644 --- a/src/unix/linux-syscalls.h +++ b/src/unix/linux-syscalls.h @@ -30,8 +30,27 @@ #include #include -#define UV__O_NONBLOCK 0x800 -#define UV__O_CLOEXEC 0x80000 +#if defined(__alpha__) +# define UV__O_CLOEXEC 0x200000 +#elif defined(__hppa__) +# define UV__O_CLOEXEC 0x200000 +#elif defined(__sparc__) +# define UV__O_CLOEXEC 0x400000 +#else +# define UV__O_CLOEXEC 0x80000 +#endif + +#if defined(__alpha__) +# define UV__O_NONBLOCK 0x4 +#elif defined(__hppa__) +# define UV__O_NONBLOCK 0x10004 +#elif defined(__mips__) +# define UV__O_NONBLOCK 0x80 +#elif defined(__sparc__) +# define UV__O_NONBLOCK 0x4000 +#else +# define UV__O_NONBLOCK 0x800 +#endif #define UV__EFD_CLOEXEC UV__O_CLOEXEC #define UV__EFD_NONBLOCK UV__O_NONBLOCK