Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | From bf5dd2932200e0199a38f3028d3bef2253f32e38 Mon Sep 17 00:00:00 2001 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 2 | From: Dengke Du <dengke.du@windriver.com> |
| 3 | Date: Thu, 9 Feb 2017 17:17:37 +0800 |
| 4 | Subject: [PATCH] fix redefinition of 'struct msgbuf' error building with musl |
| 5 | |
| 6 | When building with musl the file "sys/msg.h" already contain 'struct msgbuf' |
| 7 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 8 | Upstream-Status: Submitted [https://github.com/linux-test-project/ltp/pull/177] |
| 9 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 10 | Signed-off-by: Dengke Du <dengke.du@windriver.com> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 11 | --- |
| 12 | testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c | 4 +++- |
| 13 | 1 file changed, 3 insertions(+), 1 deletion(-) |
| 14 | |
| 15 | diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 16 | index a757c0d18..e023114d2 100644 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 17 | --- 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 Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 35 | 2.11.0 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 36 | |