ALT Linux repos
S: | 9.16.44-alt1 |
5.0: | 9.3.6-alt5 |
4.1: | 9.3.6-alt4.M41.2 |
+updates: | 9.3.6-alt4.M41.1 |
4.0: | 9.3.6-alt4.M41.1 |
+updates: | 9.3.6-alt4.M41.1 |
3.0: | 9.2.4.rel-alt2 |
Group :: System/Servers
RPM: bind
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: bind-9.3.6-alt-nofile.patch
Download
Download
--- bind/lib/isc/unix/resource.c
+++ bind/lib/isc/unix/resource.c
@@ -30,6 +30,21 @@
#ifdef __linux__
#include <linux/fs.h> /* To get the large NR_OPEN. */
+# ifndef NR_OPEN
+# define NR_OPEN 1024
+# endif
+# ifndef ISC_SOCKET_MAXSOCKETS
+# if defined(ISC_PLATFORM_HAVEKQUEUE) || defined(ISC_PLATFORM_HAVEEPOLL) || defined (ISC_PLATFORM_HAVEDEVPOLL)
+# define ISC_SOCKET_MAXSOCKETS 4096
+# else
+# define ISC_SOCKET_MAXSOCKETS NR_OPEN
+# endif
+# endif
+# if (NR_OPEN > ISC_SOCKET_MAXSOCKETS)
+# define NR_OPEN_MAX NR_OPEN
+# else
+# define NR_OPEN_MAX ISC_SOCKET_MAXSOCKETS
+# endif
#endif
#if defined(__hpux) && defined(HAVE_SYS_DYNTUNE_H)
@@ -165,7 +180,7 @@ isc_resource_setlimit(isc_resource_t resource, isc_resourcevalue_t value) {
* possible value is the NR_OPEN defined in linux/fs.h.
*/
if (resource == isc_resource_openfiles && rlim_value == RLIM_INFINITY) {
- rl.rlim_cur = rl.rlim_max = NR_OPEN;
+ rl.rlim_cur = rl.rlim_max = NR_OPEN_MAX;
unixresult = setrlimit(unixresource, &rl);
if (unixresult == 0)
return (ISC_R_SUCCESS);