From: Felix Janda <felix.janda@posteo.de>
To: musl@lists.openwall.com
Subject: [PATCH] fix namespace pollution in <unistd.h> by linux specific syscalls
Date: Thu, 3 Nov 2016 08:56:30 -0400 [thread overview]
Message-ID: <20161103125622.GA1042@nyan> (raw)
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
next reply other threads:[~2016-11-03 12:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 12:56 Felix Janda [this message]
2016-11-03 14:43 ` Szabolcs Nagy
2016-11-03 15:28 ` Felix Janda
2016-11-03 22:41 ` Rich Felker
2016-11-03 23:42 ` Felix Janda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161103125622.GA1042@nyan \
--to=felix.janda@posteo.de \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).