blob: dd7d28319cdbf7336e2979619432be7065dbd9d0 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From bf5dd2932200e0199a38f3028d3bef2253f32e38 Mon Sep 17 00:00:00 2001
Brad Bishop6e60e8b2018-02-01 10:27:11 -05002From: Dengke Du <dengke.du@windriver.com>
3Date: Thu, 9 Feb 2017 17:17:37 +0800
4Subject: [PATCH] fix redefinition of 'struct msgbuf' error building with musl
5
6When building with musl the file "sys/msg.h" already contain 'struct msgbuf'
7
Brad Bishopd7bf8c12018-02-25 22:55:05 -05008Upstream-Status: Submitted [https://github.com/linux-test-project/ltp/pull/177]
9
Brad Bishop6e60e8b2018-02-01 10:27:11 -050010Signed-off-by: Dengke Du <dengke.du@windriver.com>
Brad Bishop6e60e8b2018-02-01 10:27:11 -050011---
12 testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c | 4 +++-
13 1 file changed, 3 insertions(+), 1 deletion(-)
14
15diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c
Brad Bishopd7bf8c12018-02-25 22:55:05 -050016index a757c0d18..e023114d2 100644
Brad Bishop6e60e8b2018-02-01 10:27:11 -050017--- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c
18+++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c
19@@ -47,11 +47,13 @@ const char *TCID = "msgrcv08";
20 const int TST_TOTAL = 1;
21
22 #if __WORDSIZE == 32
23-
24+#ifdef __GLIBC__
25 struct msgbuf {
26 long mtype; /* message type, must be > 0 */
27 char mtext[16]; /* message data */
28 };
29+#else
30+#endif
31
32 static void msr(int msqid)
33 {
34--
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500352.11.0
Brad Bishop6e60e8b2018-02-01 10:27:11 -050036