summaryrefslogtreecommitdiff
path: root/libguile
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2017-02-21 22:01:45 +0100
committerAndy Wingo <wingo@pobox.com>2017-02-21 22:01:45 +0100
commit36023a0d2e14f02f7370c899b52e9803bc8c0078 (patch)
treec2097e1548c7746f88566dd66b8dd46987791301 /libguile
parentd0811644f6c8b7bd7dd812b91e53dc3b8b153d12 (diff)
Conditionally define SOCK_CLOEXEC, SOCK_NONBLOCK
* libguile/socket.c (scm_init_socket): Conditionally define SOCK_CLOEXEC and SOCK_NONBLOCK. Fixes compilation on macOS.
Diffstat (limited to 'libguile')
-rw-r--r--libguile/socket.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libguile/socket.c b/libguile/socket.c
index 64df64f4b..71c17e892 100644
--- a/libguile/socket.c
+++ b/libguile/socket.c
@@ -1653,10 +1653,13 @@ scm_init_socket ()
scm_c_define ("SOCK_RDM", scm_from_int (SOCK_RDM));
#endif
- /* accept4 flags. No ifdef as accept4 has a gnulib
- implementation. */
+ /* accept4 flags. */
+#ifdef SOCK_CLOEXEC
scm_c_define ("SOCK_CLOEXEC", scm_from_int (SOCK_CLOEXEC));
+#endif
+#ifdef SOCK_NONBLOCK
scm_c_define ("SOCK_NONBLOCK", scm_from_int (SOCK_NONBLOCK));
+#endif
/* setsockopt level.