Skip to contentSkip to conversation

lib/tst_tmpdir.c: fix compilation with older kernels

PATCH New Xiao Yang 2 participants 2 messages Feb 14, 2017 Library code

lore
Share & tools
lore

Xiao Yang

author
#0 lore raw

PATCH 1/1 lib/tst_tmpdir.c: fix compilation with older kernels

Compilation fails because of undefined __USE_GNU on RHEL5.11GA. So we need to define _GNU_SOURCE to make __USE_GNU defined.

This has been broken by commmit:

commit fc0c72a85a9de6a846587855c3c40394a6782616

Author: Cyril Hrubis <[email protected]>
Date:   Mon Feb 13 15:35:09 2017 +0100

lib: Move rmobj() to tst_tmpdir.c

---
 lib/tst_tmpdir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/tst_tmpdir.c +1 -1
index 71ca3b9..405d377 100644
@@ -56,7 +56,7 @@
  *		Neither tst_tmpdir() or tst_rmdir() has a return value.
  *
  *********************************************************/
-
+#define _GNU_SOURCE
 #include <sys/mman.h>
 #include <sys/types.h>
 #include <sys/stat.h>
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/1 lib/tst_tmpdir.c: fix compilation with older kernels

Hi!

Quoted 2 lines

Compilation fails because of undefined __USE_GNU on RHEL5.11GA. So we need to define _GNU_SOURCE to make __USE_GNU defined.

Good catch. I've updated the changelog, since the problem is about older libc not kernel and pushed along with a few more typo fixed I've done yesterday.

Signature · 2 lines
Cyril Hrubis
[email protected]