path: root/src
diff options
authorSven Eden <>2017-01-12 09:28:02 +0100
committerSven Eden <>2017-03-14 10:22:32 +0100
commit947a6c107a40f43b64adb3736a495e47caad7414 (patch)
tree79bac6e0023cf3c7b4d34e6720d5d8983e1e8481 /src
parent18a4f5b6f2977120281715a4b9dfee46a303436b (diff)
Fix lookup_errno by adding a gperf length parameter detection.
build-sys: add check for gperf lookup function signature (#5055) gperf-3.1 generates lookup functions that take a size_t length parameter instead of unsigned int. Test for this at configure time. Fixes:
Diffstat (limited to 'src')
2 files changed, 5 insertions, 2 deletions
diff --git a/src/basic/errno-list.c b/src/basic/errno-list.c
index fff37eb3e..f7f33bb44 100644
--- a/src/basic/errno-list.c
+++ b/src/basic/errno-list.c
@@ -21,11 +21,13 @@
#include <string.h>
+#include "config.h"
#include "util.h"
#include "errno-list.h"
static const struct errno_name* lookup_errno(register const char *str,
- register unsigned int len);
+ register GPERF_LEN_TYPE len);
#include "errno-to-name.h"
#include "errno-from-name.h"
diff --git a/src/login/logind.h b/src/login/logind.h
index ff9607413..306709e5b 100644
--- a/src/login/logind.h
+++ b/src/login/logind.h
@@ -24,6 +24,7 @@
#include <stdbool.h>
#include <libudev.h>
+#include "config.h"
#include "sd-event.h"
#include "sd-bus.h"
#include "list.h"
@@ -179,7 +180,7 @@ int manager_unit_is_active(Manager *manager, const char *unit);
int manager_job_is_active(Manager *manager, const char *path);
/* gperf lookup function */
-const struct ConfigPerfItem* logind_gperf_lookup (const char *str, size_t len);
+const struct ConfigPerfItem* logind_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
int manager_set_lid_switch_ignore(Manager *m, usec_t until);