]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix issue 317 53/head
authorNiLuJe <ninuje@gmail.com>
Sun, 22 Dec 2013 17:43:18 +0000 (18:43 +0100)
committerNiLuJe <ninuje@gmail.com>
Sun, 22 Dec 2013 17:43:18 +0000 (18:43 +0100)
This is the exact same fix as mentionne din the GC issue,
cf. https://code.google.com/p/libarchive/issues/detail?id=317

libarchive/archive_read_disk_posix.c

index a13dbbf812cfb1e2616243ede7286a0ae27bf3fe..94eb5e7be2db876ca5188ec889a89d71cee9e1c2 100644 (file)
@@ -1973,7 +1973,7 @@ tree_dup(int fd)
        static volatile int can_dupfd_cloexec = 1;
 
        if (can_dupfd_cloexec) {
-               new_fd = fcntl(fd, F_DUPFD_CLOEXEC);
+               new_fd = fcntl(fd, F_DUPFD_CLOEXEC, 0);
                if (new_fd != -1)
                        return (new_fd);
                /* Linux 2.6.18 - 2.6.23 declare F_DUPFD_CLOEXEC,