aboutsummaryrefslogtreecommitdiffstats
path: root/common/exechelp-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/exechelp-posix.c')
-rw-r--r--common/exechelp-posix.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/exechelp-posix.c b/common/exechelp-posix.c
index 1a1ff1bb2..8a2b3b9c2 100644
--- a/common/exechelp-posix.c
+++ b/common/exechelp-posix.c
@@ -36,6 +36,9 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
#include <string.h>
#include <errno.h>
#include <assert.h>
@@ -114,6 +117,13 @@ get_max_fds (void)
if (max_fds == -1)
max_fds = 256; /* Arbitrary limit. */
+ /* AIX returns INT32_MAX instead of a proper value. We assume that
+ this is always an error and use an arbitrary limit. */
+#ifdef INT32_MAX
+ if (max_fds == INT32_MAX)
+ max_fds = 256;
+#endif
+
return max_fds;
}