summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-12-10 21:36:12 -0500
committerRich Felker <dalias@aerifal.cx>2012-12-10 21:36:12 -0500
commit490d4a0e9e96eabffa553b279b07725c39010c1a (patch)
tree7e465c0fae6ad75c100f2aaab349f9cd99fbee2d /include
parentf1c1a5ea8295a3f8e9ea2db8961c5a68e1a3f9ed (diff)
downloadmusl-490d4a0e9e96eabffa553b279b07725c39010c1a.tar.gz
musl-490d4a0e9e96eabffa553b279b07725c39010c1a.tar.bz2
musl-490d4a0e9e96eabffa553b279b07725c39010c1a.tar.xz
musl-490d4a0e9e96eabffa553b279b07725c39010c1a.zip
fix regressions in app compatibility from previous sys/ipc.h changes
despite glibc using __key and __seq rather than key and seq, some applications, notably busybox, assume the names are key and seq unless glibc is being used. and the names key and seq are really the ones that _should_ be exposed when not attempting to present a standards-conforming namespace; apps should not be using names that begin with double-underscore. thus, the optimal fix is to use key and seq as the actual names of the members when in bsd/gnu source profile, and define macros for __key and __seq that redirect to plain key and seq.
Diffstat (limited to 'include')
-rw-r--r--include/sys/ipc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sys/ipc.h b/include/sys/ipc.h
index f4cb9ac6..c5a39819 100644
--- a/include/sys/ipc.h
+++ b/include/sys/ipc.h
@@ -16,6 +16,11 @@ extern "C" {
#define __ipc_perm_key __key
#define __ipc_perm_seq __seq
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#define __key key
+#define __seq seq
+#endif
+
#include <bits/ipc.h>
#define IPC_CREAT 01000