From 15b1afc9175e045b3b28523309fb3b28a3fab484 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 2 Aug 2020 18:01:05 +0000 Subject: 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 Reviewed-by: Andrew Bartlett Reviewed-by: Stefan Metzmacher --- lib/replace/system/network.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 #endif +#include + #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 { -- cgit v1.2.1