summaryrefslogtreecommitdiff
path: root/lib/replace
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-08-02 18:01:05 +0000
committerJeremy Allison <jra@samba.org>2023-02-02 17:30:39 +0000
commit15b1afc9175e045b3b28523309fb3b28a3fab484 (patch)
treefc79a4a7b2ebf44c3ff810e4c5c29c2c640a1e45 /lib/replace
parent65e9b409a6c27bbdf80307514523b3f37f20859d (diff)
downloadsamba-15b1afc9175e045b3b28523309fb3b28a3fab484.tar.gz
replace: provide PIPE_BUF on GNU/Hurd
There is no hardcoded PIPE_BUF pipe limitation on GNU/Hurd, but POSIX provides a minimum value that we can use. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib/replace')
-rw-r--r--lib/replace/system/network.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/replace/system/network.h b/lib/replace/system/network.h
index a84bfd453b1..1721d65a51a 100644
--- a/lib/replace/system/network.h
+++ b/lib/replace/system/network.h
@@ -91,6 +91,8 @@
#include <stropts.h>
#endif
+#include <limits.h>
+
#ifndef HAVE_SOCKLEN_T
#define HAVE_SOCKLEN_T
typedef int socklen_t;
@@ -342,6 +344,16 @@ typedef unsigned short int sa_family_t;
# endif
#endif
+#ifndef PIPE_BUF
+# ifdef __GNU__
+ /*
+ * GNU/Hurd does not have such hardcoded limitations. But it has to support
+ * the minimum POSIX value anyway.
+ */
+# define PIPE_BUF 512
+# endif
+#endif
+
#ifndef HAVE_STRUCT_ADDRINFO
#define HAVE_STRUCT_ADDRINFO
struct addrinfo {