commit - af7f5027866eea7b4299c2319f83d0eb18a395e6
commit + dd7a7d5b22adf0bd60fa6bc7b146aaf2d4dbb59c
blob - 9a66f6ba7ddb7546a29900c4fc95a185fe56f657
blob + b66f597ffb9ee2820102c30f3dc427b5e6964718
--- gotwebd/proc.c
+++ gotwebd/proc.c
for (proc = 0; proc < ps->ps_instances[dst]; proc++) {
pa = &ps->ps_pipes[PROC_GOTWEBD][0];
pb = &ps->ps_pipes[dst][proc];
- if (socketpair(AF_UNIX,
- SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC,
+ int sock_flags = SOCK_STREAM | SOCK_NONBLOCK;
+#ifdef SOCK_CLOEXEC
+ sock_flags |= SOCK_CLOEXEC;
+#endif
+ if (socketpair(AF_UNIX, sock_flags,
PF_UNSPEC, fds) == -1)
fatal("%s: socketpair", __func__);
pa = &ps->ps_pipes[src][i];
pb = &ps->ps_pipes[dst][j];
- if (socketpair(AF_UNIX,
- SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC,
+ int sock_flags = SOCK_STREAM | SOCK_NONBLOCK;
+#ifdef SOCK_CLOEXEC
+ sock_flags |= SOCK_CLOEXEC;
+#endif
+ if (socketpair(AF_UNIX, sock_flags,
PF_UNSPEC, fds) == -1)
fatal("%s: socketpair", __func__);
blob - d6c6ae4610fffa999ac7595ada5fb92eac62307c
blob + db5c23f630c6bd7e85a480ad591aeb67d9da8bbc
--- gotwebd/sockets.c
+++ gotwebd/sockets.c
return (tsock->fd);
}
- u_fd = socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK| SOCK_CLOEXEC, 0);
+ /* TA: FIXME: this needs upstreaming. */
+ int socket_flags = SOCK_STREAM | SOCK_NONBLOCK;
+#ifdef SOCK_CLOEXEC
+ socket_flags |= SOCK_CLOEXEC;
+#endif
+ u_fd = socket(AF_UNIX, socket_flags, 0);
if (u_fd == -1) {
log_warn("%s: socket", __func__);
return -1;