Skip to contentSkip to conversation

network/nfs05_make_tree: Pass -D_GNU_SOURCE to enable O_DIRECTORY

PATCH New Yuriy Kolerov 2 participants 2 messages Aug 18, 2016 – Aug 19, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 network/nfs05_make_tree: Pass -D_GNU_SOURCE to enable O_DIRECTORY

This test uses O_DIRECTORY macro and in some standard libraries it may be defined only if _GNU_SOURCE is enabled.

---
 testcases/network/nfs/nfs_stress/Makefile | 1 +
 1 file changed, 1 insertion(+)
testcases/network/nfs/nfs_stress/Makefile +1 -0
index 3162cea..2fde4cb 100644
@@ -20,6 +20,7 @@ include $(top_srcdir)/include/mk/testcases.mk
 
 nfs04_create_file: CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
 nfs05_make_tree: LDLIBS += -lpthread
+nfs05_make_tree: CPPFLAGS += -D_GNU_SOURCE
 
 INSTALL_TARGETS		:= nfs_lib.sh \
 			   nfs01 \
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 network/nfs05_make_tree: Pass -D_GNU_SOURCE to enable O_DIRECTORY

Hi,

Quoted 13 lines · Yuriy Kolerov

This test uses O_DIRECTORY macro and in some standard libraries it may be defined only if _GNU_SOURCE is enabled.

---
  testcases/network/nfs/nfs_stress/Makefile | 1 +
  1 file changed, 1 insertion(+)
testcases/network/nfs/nfs_stress/Makefile +0 -0
index 3162cea..2fde4cb 100644

testcases/network/nfs/nfs_stress/Makefile include $(top_srcdir)/include/mk/testcases.mk · line 23

Quoted 4 lines
testcases/network/nfs/nfs_stress/Makefile +1 -0
@@ -20,6 +20,7 @@ include $(top_srcdir)/include/mk/testcases.mk
 
  nfs04_create_file: CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
  nfs05_make_tree: LDLIBS += -lpthread
+nfs05_make_tree: CPPFLAGS += -D_GNU_SOURCE

Right, but the preferred way is to define this macro in the source file, before any #include.
Could you make a new patch with the fix in nfs05_make_tree.c?

Thanks,
Alexey