aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libcharon/config/ike_cfg.c6
-rw-r--r--src/libcharon/sa/xauth/xauth_manager.c3
-rw-r--r--src/libimcv/ita/ita_attr_command.c5
-rw-r--r--src/libimcv/ita/ita_attr_get_settings.c9
-rw-r--r--src/libimcv/ita/ita_attr_settings.c9
-rw-r--r--src/libimcv/plugins/imv_os/imv_os_database.c5
-rw-r--r--src/libpts/plugins/imv_attestation/imv_attestation_agent.c3
-rw-r--r--src/libpts/plugins/imv_attestation/imv_attestation_process.c3
-rw-r--r--src/libpts/tcg/pts/tcg_pts_attr_req_file_meas.c5
-rw-r--r--src/libpts/tcg/pts/tcg_pts_attr_req_file_meta.c5
-rw-r--r--src/libpts/tcg/pts/tcg_pts_attr_unix_file_meta.c5
-rw-r--r--src/libstrongswan/plugins/x509/x509_cert.c4
-rw-r--r--src/libtnccs/tnc/tnc.c6
13 files changed, 43 insertions, 25 deletions
diff --git a/src/libcharon/config/ike_cfg.c b/src/libcharon/config/ike_cfg.c
index cb6f6ca0e..c74daa0cc 100644
--- a/src/libcharon/config/ike_cfg.c
+++ b/src/libcharon/config/ike_cfg.c
@@ -14,12 +14,12 @@
* 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",
diff --git a/src/libcharon/sa/xauth/xauth_manager.c b/src/libcharon/sa/xauth/xauth_manager.c
index 17eecc2c9..3aabe7eae 100644
--- a/src/libcharon/sa/xauth/xauth_manager.c
+++ b/src/libcharon/sa/xauth/xauth_manager.c
@@ -13,6 +13,9 @@
* for more details.
*/
+#define _GNU_SOURCE /* for stdndup() */
+#include <string.h>
+
#include "xauth_manager.h"
#include <collections/linked_list.h>
diff --git a/src/libimcv/ita/ita_attr_command.c b/src/libimcv/ita/ita_attr_command.c
index f32ab2bfe..9692e1ffd 100644
--- a/src/libimcv/ita/ita_attr_command.c
+++ b/src/libimcv/ita/ita_attr_command.c
@@ -13,14 +13,15 @@
* 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;
/**
diff --git a/src/libimcv/ita/ita_attr_get_settings.c b/src/libimcv/ita/ita_attr_get_settings.c
index 196613153..d0bc31d32 100644
--- a/src/libimcv/ita/ita_attr_get_settings.c
+++ b/src/libimcv/ita/ita_attr_get_settings.c
@@ -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);
}
diff --git a/src/libimcv/ita/ita_attr_settings.c b/src/libimcv/ita/ita_attr_settings.c
index 9ce253d28..0d2967e66 100644
--- a/src/libimcv/ita/ita_attr_settings.c
+++ b/src/libimcv/ita/ita_attr_settings.c
@@ -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);
}
diff --git a/src/libimcv/plugins/imv_os/imv_os_database.c b/src/libimcv/plugins/imv_os/imv_os_database.c
index d2a08b0fa..12cf207d8 100644
--- a/src/libimcv/plugins/imv_os/imv_os_database.c
+++ b/src/libimcv/plugins/imv_os/imv_os_database.c
@@ -13,12 +13,13 @@
* 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;
/**
diff --git a/src/libpts/plugins/imv_attestation/imv_attestation_agent.c b/src/libpts/plugins/imv_attestation/imv_attestation_agent.c
index f8026e2a4..e8c3c5e40 100644
--- a/src/libpts/plugins/imv_attestation/imv_attestation_agent.c
+++ b/src/libpts/plugins/imv_attestation/imv_attestation_agent.c
@@ -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"
diff --git a/src/libpts/plugins/imv_attestation/imv_attestation_process.c b/src/libpts/plugins/imv_attestation/imv_attestation_process.c
index 83f74b332..e40c92a24 100644
--- a/src/libpts/plugins/imv_attestation/imv_attestation_process.c
+++ b/src/libpts/plugins/imv_attestation/imv_attestation_process.c
@@ -14,6 +14,9 @@
* for more details.
*/
+#define _GNU_SOURCE /* for stdndup() */
+#include <string.h>
+
#include "imv_attestation_process.h"
#include <imcv.h>
diff --git a/src/libpts/tcg/pts/tcg_pts_attr_req_file_meas.c b/src/libpts/tcg/pts/tcg_pts_attr_req_file_meas.c
index f0bc7cf60..c5a2f4b8a 100644
--- a/src/libpts/tcg/pts/tcg_pts_attr_req_file_meas.c
+++ b/src/libpts/tcg/pts/tcg_pts_attr_req_file_meas.c
@@ -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;
/**
diff --git a/src/libpts/tcg/pts/tcg_pts_attr_req_file_meta.c b/src/libpts/tcg/pts/tcg_pts_attr_req_file_meta.c
index e475cd35b..8d703af65 100644
--- a/src/libpts/tcg/pts/tcg_pts_attr_req_file_meta.c
+++ b/src/libpts/tcg/pts/tcg_pts_attr_req_file_meta.c
@@ -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;
/**
diff --git a/src/libpts/tcg/pts/tcg_pts_attr_unix_file_meta.c b/src/libpts/tcg/pts/tcg_pts_attr_unix_file_meta.c
index f96371b8b..eff64c229 100644
--- a/src/libpts/tcg/pts/tcg_pts_attr_unix_file_meta.c
+++ b/src/libpts/tcg/pts/tcg_pts_attr_unix_file_meta.c
@@ -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;
/**
diff --git a/src/libstrongswan/plugins/x509/x509_cert.c b/src/libstrongswan/plugins/x509/x509_cert.c
index 09eda32b3..ed850e8f5 100644
--- a/src/libstrongswan/plugins/x509/x509_cert.c
+++ b/src/libstrongswan/plugins/x509/x509_cert.c
@@ -20,14 +20,14 @@
#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>
diff --git a/src/libtnccs/tnc/tnc.c b/src/libtnccs/tnc/tnc.c
index 7cdd363b3..e002b10e0 100644
--- a/src/libtnccs/tnc/tnc.c
+++ b/src/libtnccs/tnc/tnc.c
@@ -13,13 +13,15 @@
* 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>