compat.h: Add SOCK_CLOEXEC and SOCK_NONBLOCK for older glibc.
PATCH 1/1 compat.h: Add SOCK_CLOEXEC and SOCK_NONBLOCK for older glibc.
From: Vinson Lee <[email protected]>
This patch fixes these build errors with glibc before 2.9.
syscalls/socket.c: In function ‘gen_socket_args’:syscalls/socket.c:82: error: ‘SOCK_CLOEXEC’ undeclared (first use in this function) syscalls/socket.c:82: error: (Each undeclared identifier is reported only once syscalls/socket.c:82: error: for each function it appears in.) syscalls/socket.c:84: error: ‘SOCK_NONBLOCK’ undeclared (first use in this function)
Signed-off-by Vinson Lee <[email protected]>
--- include/compat.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
include/compat.h +8 -0
@@ -93,6 +93,14 @@ enum {/* bits/socket.h */ +#ifndef SOCK_CLOEXEC +#define SOCK_CLOEXEC 02000000 +#endif + +#ifndef SOCK_NONBLOCK +#define SOCK_NONBLOCK 04000 +#endif +#ifndef PF_RDS #define PF_RDS 21#endif
Signature · 1 line
1.7.4.1