aboutsummaryrefslogtreecommitdiffstats
path: root/src/posix-io.c
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-05-10 11:03:34 +0000
committerJustus Winter <[email protected]>2016-05-10 11:03:34 +0000
commitf531608539b45f0bbd036f430943b390ec21aa65 (patch)
tree56cf3f4db0c38e668645668ebb3dec418bed77a5 /src/posix-io.c
parentMore GTK2 removal (diff)
parentAllow cc to detect missing cases in a switch. (diff)
downloadgpgme-f531608539b45f0bbd036f430943b390ec21aa65.tar.gz
gpgme-f531608539b45f0bbd036f430943b390ec21aa65.zip
Merge branch 'master' into justus/pyme3
Diffstat (limited to 'src/posix-io.c')
-rw-r--r--src/posix-io.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/posix-io.c b/src/posix-io.c
index ac823fc8..e49c71ec 100644
--- a/src/posix-io.c
+++ b/src/posix-io.c
@@ -23,6 +23,9 @@
#endif
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
#include <string.h>
#include <assert.h>
#include <errno.h>
@@ -331,6 +334,16 @@ get_max_fds (void)
fds = 1024;
}
+ /* AIX returns INT32_MAX instead of a proper value. We assume that
+ * this is always an error and use a more reasonable limit. */
+#ifdef INT32_MAX
+ if (fds == INT32_MAX)
+ {
+ source = "aix-fix";
+ fds = 1024;
+ }
+#endif
+
TRACE2 (DEBUG_SYSIO, "gpgme:max_fds", 0, "max fds=%i (%s)", fds, source);
return fds;
}