SHA256
1
0
forked from pool/man
man/man-db-2.5.2-fastpipe.dif
Pavol Rusnak a1a0a03d78 Accepting request 26365 from home:jengelh:branches:Base:System
Copy from home:jengelh:branches:Base:System/man via accept of submit request 26365 revision 2.
Request was accepted with message:
thanks

OBS-URL: https://build.opensuse.org/request/show/26365
OBS-URL: https://build.opensuse.org/package/show/Base:System/man?expand=0&rev=11
2009-12-13 23:07:51 +00:00

26 lines
687 B
Plaintext

Index: lib/pipeline.c
===================================================================
--- lib/pipeline.c.orig
+++ lib/pipeline.c
@@ -54,6 +54,20 @@
# include "zio.h"
#endif /* HAVE_ZIO */
+#ifdef __linux__
+# include <sys/socket.h>
+# include <netdb.h>
+# include <netinet/in.h>
+# ifndef SHUT_RD
+# define SHUT_RD 0
+# endif
+# ifndef SHUT_WR
+# define SHUT_WR 1
+# endif
+# define pipe(v) (((socketpair(AF_UNIX,SOCK_STREAM,0,v) < 0) || \
+ (shutdown((v)[1],SHUT_RD) < 0) || (shutdown((v)[0],SHUT_WR) < 0)) ? -1 : 0)
+#endif
+
/* ---------------------------------------------------------------------- */
/* Functions to build individual commands. */