]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
uclibc only defines strndup(3) if _GNU_SOURCE is defined
authorTobias Brunner <tobias@strongswan.org>
Wed, 19 Feb 2014 15:09:41 +0000 (16:09 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 19 Feb 2014 15:11:47 +0000 (16:11 +0100)
References #516.

13 files changed:
src/libcharon/config/ike_cfg.c
src/libcharon/sa/xauth/xauth_manager.c
src/libimcv/ita/ita_attr_command.c
src/libimcv/ita/ita_attr_get_settings.c
src/libimcv/ita/ita_attr_settings.c
src/libimcv/plugins/imv_os/imv_os_database.c
src/libpts/plugins/imv_attestation/imv_attestation_agent.c
src/libpts/plugins/imv_attestation/imv_attestation_process.c
src/libpts/tcg/pts/tcg_pts_attr_req_file_meas.c
src/libpts/tcg/pts/tcg_pts_attr_req_file_meta.c
src/libpts/tcg/pts/tcg_pts_attr_unix_file_meta.c
src/libstrongswan/plugins/x509/x509_cert.c
src/libtnccs/tnc/tnc.c

index cb6f6ca0e708bcc7e340052de07a525304ff4314..c74daa0cc687a8e68d7406c3249b6232b6885910 100644 (file)
  * for more details.
  */
 
-#include "ike_cfg.h"
-
+#define _GNU_SOURCE /* for stdndup() */
 #include <string.h>
 
-#include <daemon.h>
+#include "ike_cfg.h"
 
+#include <daemon.h>
 
 ENUM(ike_version_names, IKE_ANY, IKEV2,
        "IKEv1/2",
index 17eecc2c9dbf8c53573233dfa01e98ed07e0d4f2..3aabe7eaec709dfd9a96077f5163bf12e17e71b9 100644 (file)
@@ -13,6 +13,9 @@
  * for more details.
  */
 
+#define _GNU_SOURCE /* for stdndup() */
+#include <string.h>
+
 #include "xauth_manager.h"
 
 #include <collections/linked_list.h>
index f32ab2bfed67ec2a9e716050205dce949106070c..9692e1ffdb799ca9a67d9b811be36ebddb2bf535 100644 (file)
  * for more details.
  */
 
+#define _GNU_SOURCE /* for stdndup() */
+#include <string.h>
+
 #include "ita_attr.h"
 #include "ita_attr_command.h"
 
 #include <pen/pen.h>
 #include <utils/debug.h>
 
-#include <string.h>
-
 typedef struct private_ita_attr_command_t private_ita_attr_command_t;
 
 /**
index 196613153c62a9569a0c3e54d80cf762f78b829f..d0bc31d328129bd28d64d31251d1f49ae000530c 100644 (file)
@@ -13,6 +13,9 @@
  * for more details.
  */
 
+#define _GNU_SOURCE /* for stdndup() */
+#include <string.h>
+
 #include "ita_attr.h"
 #include "ita_attr_get_settings.h"
 
@@ -22,8 +25,6 @@
 #include <pen/pen.h>
 #include <utils/debug.h>
 
-#include <string.h>
-
 typedef struct private_ita_attr_get_settings_t private_ita_attr_get_settings_t;
 
 /**
@@ -166,7 +167,7 @@ METHOD(pa_tnc_attr_t, process, status_t,
        status = SUCCESS;
 
 end:
-       reader->destroy(reader);        
+       reader->destroy(reader);
        return status;
 }
 
@@ -182,7 +183,7 @@ METHOD(pa_tnc_attr_t, destroy, void,
 {
        if (ref_put(&this->ref))
        {
-               this->list->destroy_function(this->list, free); 
+               this->list->destroy_function(this->list, free);
                free(this->value.ptr);
                free(this);
        }
index 9ce253d2800597bde5ff99c6c9a866978b62fc2c..0d2967e6635e0f5f1e5b512b103b8c2f7c83dc06 100644 (file)
@@ -13,6 +13,9 @@
  * for more details.
  */
 
+#define _GNU_SOURCE /* for stdndup() */
+#include <string.h>
+
 #include "ita_attr.h"
 #include "ita_attr_settings.h"
 
@@ -22,8 +25,6 @@
 #include <pen/pen.h>
 #include <utils/debug.h>
 
-#include <string.h>
-
 typedef struct private_ita_attr_settings_t private_ita_attr_settings_t;
 typedef struct entry_t entry_t;
 
@@ -211,7 +212,7 @@ METHOD(pa_tnc_attr_t, process, status_t,
        status = SUCCESS;
 
 end:
-       reader->destroy(reader);        
+       reader->destroy(reader);
        return status;
 }
 
@@ -227,7 +228,7 @@ METHOD(pa_tnc_attr_t, destroy, void,
 {
        if (ref_put(&this->ref))
        {
-               this->list->destroy_function(this->list, (void*)free_entry);    
+               this->list->destroy_function(this->list, (void*)free_entry);
                free(this->value.ptr);
                free(this);
        }
index d2a08b0fa7d5400afb54d66703c341077dcba52a..12cf207d8743b3f3eedd373d2e351556118e9fbd 100644 (file)
  * for more details.
  */
 
+#define _GNU_SOURCE /* for stdndup() */
+#include <string.h>
+
 #include "imv_os_database.h"
 
 #include <utils/debug.h>
 
-#include <string.h>
-
 typedef struct private_imv_os_database_t private_imv_os_database_t;
 
 /**
index f8026e2a4b5acd40615dd4899c16c16179e08dcc..e8c3c5e40f6e2cdbb33b02bdeec8711d38a4d728 100644 (file)
@@ -14,6 +14,9 @@
  * for more details.
  */
 
+#define _GNU_SOURCE /* for stdndup() */
+#include <string.h>
+
 #include "imv_attestation_agent.h"
 #include "imv_attestation_state.h"
 #include "imv_attestation_process.h"
index 83f74b332886239c61082323b8af06d857c230a3..e40c92a24b5044c258c0c5c815bbec4b942b84db 100644 (file)
@@ -14,6 +14,9 @@
  * for more details.
  */
 
+#define _GNU_SOURCE /* for stdndup() */
+#include <string.h>
+
 #include "imv_attestation_process.h"
 
 #include <imcv.h>
index f0bc7cf60181aa647747107d0e18ff65479918b8..c5a2f4b8a13617e9e65329713c76f6e8c700bd3d 100644 (file)
@@ -13,6 +13,9 @@
  * for more details.
  */
 
+#define _GNU_SOURCE /* for stdndup() */
+#include <string.h>
+
 #include "tcg_pts_attr_req_file_meas.h"
 
 #include <pa_tnc/pa_tnc_msg.h>
@@ -20,8 +23,6 @@
 #include <bio/bio_reader.h>
 #include <utils/debug.h>
 
-#include <string.h>
-
 typedef struct private_tcg_pts_attr_req_file_meas_t private_tcg_pts_attr_req_file_meas_t;
 
 /**
index e475cd35b824264358e5a60bb73f58ba40f1b3a2..8d703af654bf6d7059a960fbe94610c915ff08de 100644 (file)
@@ -13,6 +13,9 @@
  * for more details.
  */
 
+#define _GNU_SOURCE /* for stdndup() */
+#include <string.h>
+
 #include "tcg_pts_attr_req_file_meta.h"
 
 #include <pa_tnc/pa_tnc_msg.h>
@@ -20,8 +23,6 @@
 #include <bio/bio_reader.h>
 #include <utils/debug.h>
 
-#include <string.h>
-
 typedef struct private_tcg_pts_attr_req_file_meta_t private_tcg_pts_attr_req_file_meta_t;
 
 /**
index f96371b8b0e3273a0fca0a29d9a1912a35dd44d3..eff64c229f2216985e9aa98926cd0f7a2d49c09b 100644 (file)
@@ -13,6 +13,9 @@
  * for more details.
  */
 
+#define _GNU_SOURCE /* for stdndup() */
+#include <string.h>
+
 #include "tcg_pts_attr_unix_file_meta.h"
 
 #include <pa_tnc/pa_tnc_msg.h>
@@ -21,8 +24,6 @@
 #include <collections/linked_list.h>
 #include <utils/debug.h>
 
-#include <string.h>
-
 typedef struct private_tcg_pts_attr_file_meta_t private_tcg_pts_attr_file_meta_t;
 
 /**
index 09eda32b3e9bb2e2fda5df374ade020d505308a3..ed850e8f57c4363ebc1d7d4ea89fefc46cb9b7ce 100644 (file)
 
 #define _GNU_SOURCE
 
-#include "x509_cert.h"
-
 #include <sys/stat.h>
 #include <time.h>
 #include <unistd.h>
 #include <string.h>
 #include <stdio.h>
 
+#include "x509_cert.h"
+
 #include <library.h>
 #include <utils/debug.h>
 #include <asn1/oid.h>
index 7cdd363b3c755ca1cadb6c440d5888df89cbb70d..e002b10e0dd082e5be572fa3403330e787887354 100644 (file)
  * for more details.
  */
 
-#include "tnc.h"
-
+#define _GNU_SOURCE /* for stdndup() */
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <string.h>
+
+#include "tnc.h"
 
 #include <utils/lexparser.h>
 #include <utils/debug.h>