diff mbox series

[1/1] setxattr03: define _GNU_SOURCE to fix build on musl

Message ID 20191016213001.23047-1-petr.vorel@gmail.com
State Accepted
Delegated to: Petr Vorel
Headers show
Series [1/1] setxattr03: define _GNU_SOURCE to fix build on musl | expand

Commit Message

Petr Vorel Oct. 16, 2019, 9:30 p.m. UTC
From: Petr Vorel <pvorel@suse.cz>

musl defines loff_t in <fcntl.h> (already included) and guard it under _GNU_SOURCE.
NOTE: glibc and others define it in <sys/types.h>

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
 testcases/kernel/syscalls/setxattr/setxattr03.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Cyril Hrubis Oct. 17, 2019, 9:15 a.m. UTC | #1
Hi!
> musl defines loff_t in <fcntl.h> (already included) and guard it under _GNU_SOURCE.
> NOTE: glibc and others define it in <sys/types.h>

I would say that this is obvious enough to go in without a review, acked
nevertheless.
Jan Stancek Oct. 17, 2019, 10:02 a.m. UTC | #2
----- Original Message -----
> From: Petr Vorel <pvorel@suse.cz>
> 
> musl defines loff_t in <fcntl.h> (already included) and guard it under
> _GNU_SOURCE.
> NOTE: glibc and others define it in <sys/types.h>
> 
> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>

ACK
Petr Vorel Oct. 17, 2019, 8:16 p.m. UTC | #3
Hi Cyril, Jan,

> Hi!
> > musl defines loff_t in <fcntl.h> (already included) and guard it under _GNU_SOURCE.
> > NOTE: glibc and others define it in <sys/types.h>

> I would say that this is obvious enough to go in without a review, acked
> nevertheless.

Thanks for review, pushed.
Sorry for taking your time with obvious fix, next time I'll push it.

Kind regards,
Petr
diff mbox series

Patch

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>