[hipl-commit] [trunk] Rev 4231: Fix misplaced _BSD_SOURCE feature test macros.

  • From: Mircea Gherzan <mircea.gherzan@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Sat, 10 Apr 2010 00:11:55 +0300

Committer: Mircea Gherzan <mircea.gherzan@xxxxxxxxxxxxxx>
Date: 10/04/2010 at 00:11:55
Revision: 4231
Revision-id: mircea.gherzan@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Fix misplaced _BSD_SOURCE feature test macros.
  
  Having them in header files is simply wrong. So moved them where they
  belong: to the related C files.

Modified:
  M  firewall/conntrack.h
  M  firewall/esp_prot_conntrack.h
  M  firewall/firewall_defines.h
  M  firewall/lsi.h
  M  firewall/midauth.h
  M  firewall/proxy.h
  M  firewall/user_ipsec_api.c
  M  firewall/user_ipsec_api.h
  M  firewall/user_ipsec_esp.h
  M  hipd/pfkeyapi.c
  M  lib/ipsec/libpfkey.h
  M  lib/tool/checksum.h
  M  lib/tool/pfkeysadb.h

=== modified file 'firewall/conntrack.h'
--- firewall/conntrack.h        2010-03-21 23:04:35 +0000
+++ firewall/conntrack.h        2010-04-09 21:10:27 +0000
@@ -6,8 +6,6 @@
 #ifndef HIP_FIREWALL_CONNTRACK_H
 #define HIP_FIREWALL_CONNTRACK_H
 
-#define _BSD_SOURCE
-
 #include <netinet/in.h>
 #include <netinet/ip.h>
 #include <netinet/ip6.h>

=== modified file 'firewall/esp_prot_conntrack.h'
--- firewall/esp_prot_conntrack.h       2010-03-18 21:15:21 +0000
+++ firewall/esp_prot_conntrack.h       2010-04-09 21:10:27 +0000
@@ -14,8 +14,6 @@
 #ifndef HIP_FIREWALL_ESP_PROT_CONNTRACK_H
 #define HIP_FIREWALL_ESP_PROT_CONNTRACK_H
 
-#define _BSD_SOURCE
-
 #include "lib/core/protodefs.h"
 #include "conntrack.h"
 

=== modified file 'firewall/firewall_defines.h'
--- firewall/firewall_defines.h 2010-03-19 09:00:54 +0000
+++ firewall/firewall_defines.h 2010-04-09 21:10:27 +0000
@@ -6,8 +6,6 @@
 #ifndef HIP_FIREWALL_FIREWALL_DEFINES_H
 #define HIP_FIREWALL_FIREWALL_DEFINES_H
 
-#define _BSD_SOURCE
-
 #include <net/if.h>
 #include <sys/time.h>
 #include <libipq.h>

=== modified file 'firewall/lsi.h'
--- firewall/lsi.h      2010-03-19 09:00:54 +0000
+++ firewall/lsi.h      2010-04-09 21:10:27 +0000
@@ -6,8 +6,6 @@
 #ifndef HIP_FIREWALL_LSI_H
 #define HIP_FIREWALL_LSI_H
 
-#define _BSD_SOURCE
-
 #include <libipq.h>
 #include <netinet/ip_icmp.h>
 #include <linux/netfilter_ipv4/ip_queue.h>

=== modified file 'firewall/midauth.h'
--- firewall/midauth.h  2010-03-18 21:15:21 +0000
+++ firewall/midauth.h  2010-04-09 21:10:27 +0000
@@ -12,8 +12,6 @@
 #ifndef HIP_FIREWALL_MIDAUTH_H
 #define HIP_FIREWALL_MIDAUTH_H
 
-#define _BSD_SOURCE
-
 #include <netinet/ip6.h>
 #include <netinet/ip.h>
 #include <netinet/udp.h>

=== modified file 'firewall/proxy.h'
--- firewall/proxy.h    2010-03-19 09:00:54 +0000
+++ firewall/proxy.h    2010-04-09 21:10:27 +0000
@@ -6,8 +6,6 @@
 #ifndef HIP_FIREWALL_PROXY_H
 #define HIP_FIREWALL_PROXY_H
 
-#define _BSD_SOURCE
-
 #include <libipq.h>
 
 #include "firewall.h"

=== modified file 'firewall/user_ipsec_api.c'
--- firewall/user_ipsec_api.c   2010-04-09 16:24:44 +0000
+++ firewall/user_ipsec_api.c   2010-04-09 21:10:27 +0000
@@ -11,6 +11,9 @@
  *
  */
 
+/* required for IFNAMSIZ in libipq headers */
+#define _BSD_SOURCE
+
 #include "user_ipsec_api.h"
 #include "user_ipsec_sadb.h"
 #include "user_ipsec_esp.h"

=== modified file 'firewall/user_ipsec_api.h'
--- firewall/user_ipsec_api.h   2010-03-18 21:15:21 +0000
+++ firewall/user_ipsec_api.h   2010-04-09 21:10:27 +0000
@@ -14,8 +14,6 @@
 #ifndef HIP_FIREWALL_USER_IPSEC_API_H
 #define HIP_FIREWALL_USER_IPSEC_API_H
 
-#define _BSD_SOURCE
-
 #include <netinet/udp.h>
 #include <openssl/evp.h>
 

=== modified file 'firewall/user_ipsec_esp.h'
--- firewall/user_ipsec_esp.h   2010-03-19 09:00:54 +0000
+++ firewall/user_ipsec_esp.h   2010-04-09 21:10:27 +0000
@@ -29,8 +29,6 @@
 #ifndef HIP_FIREWALL_USER_IPSEC_ESP_H
 #define HIP_FIREWALL_USER_IPSEC_ESP_H
 
-#define _BSD_SOURCE
-
 #include "firewall/user_ipsec_sadb.h"
 #include "firewall/firewall_defines.h"
 

=== modified file 'hipd/pfkeyapi.c'
--- hipd/pfkeyapi.c     2010-04-09 16:24:44 +0000
+++ hipd/pfkeyapi.c     2010-04-09 21:10:27 +0000
@@ -11,6 +11,9 @@
  * @see lib/tool/xfrmapi.c for the wrappers for XFRM API
  */
 
+/* required for s6_addr32 */
+#define _BSD_SOURCE
+
 #include <linux/ipsec.h>
 
 #include "config.h"

=== modified file 'lib/ipsec/libpfkey.h'
--- lib/ipsec/libpfkey.h        2010-03-29 19:28:37 +0000
+++ lib/ipsec/libpfkey.h        2010-04-09 21:10:27 +0000
@@ -37,8 +37,6 @@
 #ifndef KAME_LIBPFKEY_H
 #define KAME_LIBPFKEY_H
 
-#define _BSD_SOURCE
-
 #include <sys/cdefs.h>
 #include <sys/types.h>
 #include <linux/ipsec.h>

=== modified file 'lib/tool/checksum.h'
--- lib/tool/checksum.h 2010-03-29 19:28:37 +0000
+++ lib/tool/checksum.h 2010-04-09 21:10:27 +0000
@@ -1,8 +1,6 @@
 #ifndef HIP_LIB_CORE_CHECKSUM_H
 #define HIP_LIB_CORE_CHECKSUM_H
 
-#define _BSD_SOURCE
-
 #include <sys/types.h>
 #include <netinet/in.h>
 #include <netinet/ip.h>

=== modified file 'lib/tool/pfkeysadb.h'
--- lib/tool/pfkeysadb.h        2010-04-09 16:24:44 +0000
+++ lib/tool/pfkeysadb.h        2010-04-09 21:10:27 +0000
@@ -1,8 +1,6 @@
 #ifndef HIP_LIB_TOOL_PFKEYSADB_H
 #define HIP_LIB_TOOL_PFKEYSADB_H
 
-#define _BSD_SOURCE
-
 #include <sys/socket.h>
 #include <sys/types.h>

Other related posts:

  • » [hipl-commit] [trunk] Rev 4231: Fix misplaced _BSD_SOURCE feature test macros. - Mircea Gherzan