aboutsummaryrefslogtreecommitdiff
path: root/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'core.c')
-rw-r--r--core.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/core.c b/core.c
index 378f085..a17422a 100644
--- a/core.c
+++ b/core.c
@@ -42,6 +42,13 @@
#include "hal_internal.h"
/*
+ * POSIX function whose declaration gets lost somewhere in the twisty
+ * corridors of glibc's "Feature Test Macro" system.
+ */
+
+extern size_t strnlen(const char *, size_t);
+
+/*
* Structure of our internal database is private, in case we want to
* change representation (array, tree, list of lists, whatever) at
* some later date without having to change the public API.
@@ -208,7 +215,7 @@ hal_error_t hal_core_alloc(const char *name, hal_core_t **pcore)
{
hal_core_t *core;
hal_error_t err = HAL_ERROR_CORE_NOT_FOUND;
-
+
if (name == NULL && (pcore == NULL || *pcore == NULL))
return HAL_ERROR_BAD_ARGUMENTS;