buildroot/package/ltp-testsuite/0003-setxattr03-define-_GNU_SOURCE-to-fix-build-on-musl.patch
Petr Vorel e1281472ec package/ltp-testsuite: enable build under musl
This requires to remove a lot of broken code until it's fixed in upstream.
Added 2 patches from upcoming release.

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-10-21 21:44:22 +02:00

28 lines
890 B
Diff

From a712a3930d98336f4a0931ae06da691b7fa0ecd7 Mon Sep 17 00:00:00 2001
From: Petr Vorel <pvorel@suse.cz>
Date: Mon, 14 Oct 2019 13:02:55 +0200
Subject: [PATCH] setxattr03: define _GNU_SOURCE to fix build on musl
musl defines loff_t in <fcntl.h> and guard it under _GNU_SOURCE.
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
[Upstream status: 3d2b9ef91f32a0a1794a8a05b825b18c6f956b0c]
---
testcases/kernel/syscalls/setxattr/setxattr03.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/syscalls/setxattr/setxattr03.c b/testcases/kernel/syscalls/setxattr/setxattr03.c
index bb511d5ba..58ee0f880 100644
--- a/testcases/kernel/syscalls/setxattr/setxattr03.c
+++ b/testcases/kernel/syscalls/setxattr/setxattr03.c
@@ -13,6 +13,7 @@
* -1 and set errno to EPERM
*/
+#define _GNU_SOURCE
#include "config.h"
#include <sys/ioctl.h>
#include <sys/types.h>
--
2.23.0