replace: add fallback define for IOV_MAX
authorStefan Metzmacher <metze@samba.org>
Mon, 8 Jun 2009 07:01:45 +0000 (09:01 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 8 Jun 2009 07:40:11 +0000 (09:40 +0200)
This hopefully fixes the build on IRIX.

metze

lib/replace/system/network.h

index 6add99c0db7cfc13b08e7d21eaa127f2e700d160..c8364101a9ff3c9380098ebeb9e7ae8cde33dac0 100644 (file)
@@ -307,6 +307,22 @@ typedef unsigned short int sa_family_t;
 #endif
 #endif
 
+#ifndef IOV_MAX
+# ifdef UIO_MAXIOV
+#  define IOV_MAX UIO_MAXIOV
+# else
+#  ifdef __sgi
+    /*
+     * IRIX 6.5 has sysconf(_SC_IOV_MAX)
+     * which might return 512 or bigger
+     */
+#   define IOV_MAX 512
+#  else
+#   error IOV_MAX and UIO_MAXIOV undefined
+#  endif
+# endif
+#endif
+
 #ifndef HAVE_STRUCT_ADDRINFO
 #define HAVE_STRUCT_ADDRINFO
 struct addrinfo {