X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm-scripts-closefds.patch;h=5a9f7871c0cc8e2ed94212d9e5e08052fecdc5a1;hb=abba81d12998a913734d65da9c7ead89aa8b92cc;hp=a3b72d890330903aaaa3ee659dd2789f0ada9fb1;hpb=5b0f0ac9a55211821b0778001221c01854a2e4d2;p=packages%2Frpm.git diff --git a/rpm-scripts-closefds.patch b/rpm-scripts-closefds.patch index a3b72d8..5a9f787 100644 --- a/rpm-scripts-closefds.patch +++ b/rpm-scripts-closefds.patch @@ -6,14 +6,14 @@ } - } else + } else { -+ int oldfl; ++ long oldfl; fd = fdLink(fd, "persist (showProgress)"); + oldfl=Fcntl(fd, F_GETFD, 0); + if(oldfl >= 0) { + oldfl |= FD_CLOEXEC; /* scripts shouldn't inherit rpm file descriptor */ -+ Fcntl(fd, F_SETFD, oldfl); ++ Fcntl(fd, F_SETFD, (void*)oldfl); + } + } - /*@=type@*/ - return fd; - /*@notreached@*/ break; + + #if defined(POSIX_FADV_WILLNEED) + (void) Fadvise(fd, 0, 0, POSIX_FADV_WILLNEED);