linux: handle O_NONBLOCK != SOCK_NONBLOCK case
linux-syscalls.h assumes that on all Linux platforms the value of O_NONBLOCK is the same as SOCK_NONBLOCK. This commit fixes it, as it is at least not true for hppa, and resolves #1442. Signed-off-by: Luca Bruno <lucab@debian.org>
This commit is contained in:
parent
b705b53edd
commit
5672bbd68a
@ -43,7 +43,7 @@
|
||||
#if defined(__alpha__)
|
||||
# define UV__O_NONBLOCK 0x4
|
||||
#elif defined(__hppa__)
|
||||
# define UV__O_NONBLOCK 0x10004
|
||||
# define UV__O_NONBLOCK O_NONBLOCK
|
||||
#elif defined(__mips__)
|
||||
# define UV__O_NONBLOCK 0x80
|
||||
#elif defined(__sparc__)
|
||||
@ -59,7 +59,11 @@
|
||||
#define UV__IN_NONBLOCK UV__O_NONBLOCK
|
||||
|
||||
#define UV__SOCK_CLOEXEC UV__O_CLOEXEC
|
||||
#define UV__SOCK_NONBLOCK UV__O_NONBLOCK
|
||||
#if defined(SOCK_NONBLOCK)
|
||||
# define UV__SOCK_NONBLOCK SOCK_NONBLOCK
|
||||
#else
|
||||
# define UV__SOCK_NONBLOCK UV__O_NONBLOCK
|
||||
#endif
|
||||
|
||||
/* epoll flags */
|
||||
#define UV__EPOLL_CLOEXEC UV__O_CLOEXEC
|
||||
|
||||
Loading…
Reference in New Issue
Block a user