blob: cd9f86cd9f362a023bd4d27072441827c3e79c9e (
plain)
1 diff -ru postfix-3.6.2.orig/src/util/sys_compat.c postfix-3.6.2/src/util/sys_compat.c
2 --- postfix-3.6.2.orig/src/util/sys_compat.c 2021-09-15 16:42:06.337124020 +0200
3 +++ postfix-3.6.2/src/util/sys_compat.c 2021-09-15 16:43:00.893791647 +0200
4 @@ -286,7 +286,7 @@
5
6 /* closefrom() - closes all file descriptors from the given one up */
7
8 -int closefrom(int lowfd)
9 +void closefrom(int lowfd)
10 {
11 int fd_limit = open_limit(0);
12 int fd;
13 @@ -298,14 +298,12 @@
14 */
15 if (lowfd < 0) {
16 errno = EBADF;
17 - return (-1);
18 + return;
19 }
20 if (fd_limit > 500)
21 fd_limit = 500;
22 for (fd = lowfd; fd < fd_limit; fd++)
23 (void) close(fd);
24 -
25 - return (0);
26 }
27
28 #endif
29 diff -ru postfix-3.6.2.orig/src/util/sys_defs.h postfix-3.6.2/src/util/sys_defs.h
30 --- postfix-3.6.2.orig/src/util/sys_defs.h 2021-09-15 16:42:06.337124020 +0200
31 +++ postfix-3.6.2/src/util/sys_defs.h 2021-09-15 16:42:34.500457851 +0200
32 @@ -1509,7 +1509,7 @@
33 #endif
34
35 #ifndef HAS_CLOSEFROM
36 -extern int closefrom(int);
37 +extern void closefrom(int);
38
39 #endif
40
|