uclibc only defines strndup(3) if _GNU_SOURCE is defined
References #516.
This commit is contained in:
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user