diff options
| author | Roy Marples <roy@marples.name> | 2016-03-11 13:44:42 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2016-03-11 13:44:42 +0000 |
| commit | 9843976ae092495eb37e397a6f36432411010d00 (patch) | |
| tree | 00d8f2d78a39057a42d2d9666c2f3e9d82639b5c /ipv6nd.c | |
| parent | b48c14b7363ef246351f18458eb9a1657871f69a (diff) | |
| download | dhcpcd-9843976ae092495eb37e397a6f36432411010d00.tar.xz | |
Fix compile on older platforms which lack O_CLOEXEC.
Thanks to OBATA Akio.
Diffstat (limited to 'ipv6nd.c')
| -rw-r--r-- | ipv6nd.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -189,8 +189,9 @@ ipv6nd_open(struct dhcpcd_ctx *dctx) ctx = dctx->ipv6; if (ctx->nd_fd != -1) return ctx->nd_fd; - ctx->nd_fd = xsocket(PF_INET6, SOCK_RAW, IPPROTO_ICMPV6, - O_NONBLOCK|O_CLOEXEC); +#define SOCK_FLAGS SOCK_CLOEXEC | SOCK_NONBLOCK + ctx->nd_fd = xsocket(PF_INET6, SOCK_RAW, IPPROTO_ICMPV6, SOCK_FLAGS); +#undef SOCK_FLAGS if (ctx->nd_fd == -1) return -1; |
