}
- } 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);