From e7a70c5ddfa0f925760c131c2c60c25b814df222 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Mon, 8 Jan 2007 17:46:07 +0100 Subject: [PATCH] Windows does not have the close-on-exec flag. --- sha1_file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sha1_file.c b/sha1_file.c index 3025440941..14ec604797 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -572,6 +572,7 @@ static void open_packed_git(struct packed_git *p) } else if (p->pack_size != st.st_size) die("packfile %s size changed", p->pack_name); +#ifndef __MINGW32__ /* We leave these file descriptors open with sliding mmap; * there is no point keeping them open across exec(), though. */ @@ -581,6 +582,7 @@ static void open_packed_git(struct packed_git *p) fd_flag |= FD_CLOEXEC; if (fcntl(p->pack_fd, F_SETFD, fd_flag) == -1) die("cannot set FD_CLOEXEC"); +#endif /* Verify we recognize this pack file format. */ if (read_in_full(p->pack_fd, &hdr, sizeof(hdr)) != sizeof(hdr))