]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2549. [port] linux: define NR_OPEN if not currently defined.
authorMark Andrews <marka@isc.org>
Fri, 13 Feb 2009 09:32:22 +0000 (09:32 +0000)
committerMark Andrews <marka@isc.org>
Fri, 13 Feb 2009 09:32:22 +0000 (09:32 +0000)
                        [RT #19344]

CHANGES
lib/isc/unix/resource.c

diff --git a/CHANGES b/CHANGES
index c4ec2074b9ebd48f9f8435c802aeda157bb6edf4..77ff718486a0f6892ad0e1cd8fcce84026812d05 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2549.  [port]          linux: define NR_OPEN if not currently defined.
+                       [RT #19344]
+
 2547.  [bug]           openssl_link.c:mem_realloc() could reference an
                        out-of-range area of the source buffer.  New public
                        function isc_mem_reallocate() was introduced to address
index e9bc5fd6bd17eb7cf2c462bb2bccc596b577add2..a985feb6a68a6ec9310ef0b403539fe47a344a45 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resource.c,v 1.12.18.6 2008/08/05 07:17:05 marka Exp $ */
+/* $Id: resource.c,v 1.12.18.7 2009/02/13 09:32:22 marka Exp $ */
 
 #include <config.h>
 
@@ -159,7 +159,11 @@ isc_resource_setlimit(isc_resource_t resource, isc_resourcevalue_t value) {
                if (unixresult == 0)
                        return (ISC_R_SUCCESS);
        }
-#elif defined(NR_OPEN) && defined(__linux__)
+#elif defined(__linux__)
+#ifndef NR_OPEN
+#define NR_OPEN (1024*1024)
+#endif
+
        /*
         * Some Linux kernels don't accept RLIM_INFINIT; the maximum
         * possible value is the NR_OPEN defined in linux/fs.h.