[PATCH] build: use _DEFAULT_SOURCE for newer glibc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since _BSD_SOURCE is deprecated with newer glibc versions, we get build
warnings when using only that define.  Add the newer _DEFAULT_SOURCE to
quiet things down.

For example, we currently see:
In file included from /usr/include/math.h:26:0,
                 from libxt_hashlimit.c:15:
/usr/include/features.h:148:3: warning:
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"

Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx>
---
 extensions/libxt_hashlimit.c | 1 +
 extensions/libxt_limit.c     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/extensions/libxt_hashlimit.c b/extensions/libxt_hashlimit.c
index c5b8d77..cbe06bb 100644
--- a/extensions/libxt_hashlimit.c
+++ b/extensions/libxt_hashlimit.c
@@ -10,6 +10,7 @@
  * 
  * Error corections by nmalykh@xxxxxxxxx (22.01.2005)
  */
+#define _DEFAULT_SOURCE 1
 #define _BSD_SOURCE 1
 #define _ISOC99_SOURCE 1
 #include <math.h>
diff --git a/extensions/libxt_limit.c b/extensions/libxt_limit.c
index f75ef2f..dd8885a 100644
--- a/extensions/libxt_limit.c
+++ b/extensions/libxt_limit.c
@@ -3,6 +3,7 @@
  * Jérôme de Vivie   <devivie@xxxxxxxxxxxxxxxxxxxxxxxxx>
  * Hervé Eychenne    <rv@xxxxxxxxxxxx>
  */
+#define _DEFAULT_SOURCE 1
 #define _BSD_SOURCE 1
 #define _ISOC99_SOURCE 1
 #include <math.h>
-- 
2.4.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux