summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-04-20 06:44:14 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-04-20 06:44:14 -0700
commitd167da13024b536dc75b00a9f458de1bc7518b22 (patch)
treebce62cc2709c602deaaaff20e6399a6ade70100a
parent814b1a284fc22feb9444f2195a36c57cbacd84aa (diff)
downloadtxr-d167da13024b536dc75b00a9f458de1bc7518b22.tar.gz
txr-d167da13024b536dc75b00a9f458de1bc7518b22.tar.bz2
txr-d167da13024b536dc75b00a9f458de1bc7518b22.zip
ftw.c affected by g++/glibc issue __USE_GNU is defined.
When compiling as C++, __USE_GNU is defined even though we use -ansi and don't specify -D_GNU_SOURCE anywhere. Glibc headers don't seem to respond to the C++ ANSI options. ftw.c: Workaround for compiler warning: only define __USE_GNU if it is not defined already.
-rw-r--r--ftw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ftw.c b/ftw.c
index 7b18cebd..6128a652 100644
--- a/ftw.c
+++ b/ftw.c
@@ -29,7 +29,9 @@
#include <signal.h>
#include <stdlib.h>
#include <stddef.h>
+#ifndef __USE_GNU
#define __USE_GNU
+#endif
#include <ftw.h>
#include "config.h"
#include ALLOCA_H