Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161103125622.GA1042@nyan>
Date: Thu, 3 Nov 2016 08:56:30 -0400
From: Felix Janda <felix.janda@...teo.de>
To: musl@...ts.openwall.com
Subject: [PATCH] fix namespace pollution in <unistd.h> by linux specific
 syscalls

The exposure of pipe2() breaks compilation for staden-io_lib.
---
 include/unistd.h   | 4 ++--
 src/unistd/pipe2.c | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/unistd.h b/include/unistd.h
index 09190af..1085da6 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -33,12 +33,10 @@ extern "C" {
 #include <bits/alltypes.h>
 
 int pipe(int [2]);
-int pipe2(int [2], int);
 int close(int);
 int posix_close(int, int);
 int dup(int);
 int dup2(int, int);
-int dup3(int, int, int);
 off_t lseek(int, off_t, int);
 int fsync(int);
 int fdatasync(int);
@@ -188,6 +186,8 @@ char *get_current_dir_name(void);
 int syncfs(int);
 int euidaccess(const char *, int);
 int eaccess(const char *, int);
+int pipe2(int [2], int);
+int dup3(int, int, int);
 #endif
 
 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
diff --git a/src/unistd/pipe2.c b/src/unistd/pipe2.c
index f24f74f..af628d3 100644
--- a/src/unistd/pipe2.c
+++ b/src/unistd/pipe2.c
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <unistd.h>
 #include <errno.h>
 #include <fcntl.h>
-- 
2.7.3

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.