]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix compile on systems lacking SOCK_CLOEXEC.
authorRoy Marples <roy@marples.name>
Sun, 23 Aug 2015 16:12:18 +0000 (16:12 +0000)
committerRoy Marples <roy@marples.name>
Sun, 23 Aug 2015 16:12:18 +0000 (16:12 +0000)
if.c

diff --git a/if.c b/if.c
index 834e99b4a01c1adf35af9ca1ef3e2bced291fb83..6c450b99ee8980763bad5a119803caebf91f2e64 100644 (file)
--- a/if.c
+++ b/if.c
@@ -676,7 +676,7 @@ xsocket(int domain, int type, int protocol, int flags)
        if ((s = socket(domain, type, protocol)) == -1)
                return -1;
        if ((flags & O_CLOEXEC) && (xflags = fcntl(s, F_GETFD, 0)) == -1 ||
-           fcntl(s, F_SETFD, xlags | FD_CLOEXEC) == -1)
+           fcntl(s, F_SETFD, xflags | FD_CLOEXEC) == -1)
                goto out;
        if ((flags & O_NONBLOCK) && (xflags = fcntl(s, F_GETFL, 0)) == -1 ||
            fcntl(s, F_SETFL, xflags | O_NONBLOCK) == -1)