6247ea2a76
OBS-URL: https://build.opensuse.org/package/show/Base:System/man?expand=0&rev=7790c905baf2a19f1a1ef4f07ceb164a
24 lines
628 B
Plaintext
24 lines
628 B
Plaintext
--- lib/pipeline.c
|
|
+++ lib/pipeline.c 2008-11-21 10:53:20.554776039 +0000
|
|
@@ -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. */
|