From 803f5a096e1ce3d1b22c59565185e5a728ec2abd Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 9 Jan 2012 15:42:56 +0100 Subject: [PATCH] linux: fix build on older distros --- src/unix/internal.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/unix/internal.h b/src/unix/internal.h index 1adb5f20..3ae5d054 100644 --- a/src/unix/internal.h +++ b/src/unix/internal.h @@ -59,6 +59,18 @@ # define HAVE_SYS_ACCEPT4 1 # endif +# ifndef O_CLOEXEC +# define O_CLOEXEC 02000000 +# endif + +# ifndef SOCK_CLOEXEC +# define SOCK_CLOEXEC O_CLOEXEC +# endif + +# ifndef SOCK_NONBLOCK +# define SOCK_NONBLOCK O_NONBLOCK +# endif + # if HAVE_SYS_UTIMESAT inline static int sys_utimesat(int dirfd, const char* path,