* remove likely invalid iat DEPs
[t2sde.git] / package / network / ntp / rlimit-fix.patch.cross
blobf31f922047abf59c9c7ed022d34a00e7e6e88afc
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3
4 # T2 SDE: package/.../ntp/rlimit-fix.patch.cross
5 # Copyright (C) 2015 - 2018 The T2 SDE Project
6
7 # More information can be found in the files COPYING and README.
8
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 --- ntp-4.2.8p11/ntpd/ntp_config.c.vanilla      2018-04-13 16:33:33.534136795 +0000
18 +++ ntp-4.2.8p11/ntpd/ntp_config.c      2018-04-13 16:37:44.442142018 +0000
19 @@ -2860,7 +2860,7 @@
20                                 cur_memlock = 0;
21  # endif /* HAVE_MLOCKALL */
22                         } else if (rlimit_av->value.i >= 0) {
23 -#if defined(RLIMIT_MEMLOCK)
24 +#if defined(RLIMIT_MEMLOCK) && defined(HAVE_SETRLIMIT)
25  # if defined(HAVE_MLOCKALL)
26                                 if (cur_memlock != 1) {
27                                         if (-1 == mlockall(MCL_CURRENT|MCL_FUTURE)) {
28 @@ -2627,5 +2629,5 @@
30                 case T_Stacksize:
31 -#if defined(RLIMIT_STACK)
32 +#if defined(RLIMIT_STACK) && defined(HAVE_SETRLIMIT)
33                         ntp_rlimit(RLIMIT_STACK,
34                                    (rlim_t)(rlimit_av->value.i * 4096),
35 @@ -2639,5 +2643,5 @@
37                 case T_Filenum:
38 -#if defined(RLIMIT_NOFILE)
39 +#if defined(RLIMIT_NOFILE) && defined(HAVE_SETRLIMIT)
40                         ntp_rlimit(RLIMIT_NOFILE,
41                                   (rlim_t)(rlimit_av->value.i),