1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../ntp/rlimit-fix.patch.cross
5 # Copyright (C) 2015 - 2018 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
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
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
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)) {
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),
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),