commit 843d5baf6aad6c53fc00ea8d95d83209a4f92de1
Author: Martin Pitt <martin.pitt@ubuntu.com>
Date:   Thu Nov 10 05:33:13 2016 +0100

    core: don't use the unified hierarchy for the systemd cgroup yet (#4628)
    
    Too many things don't get along with the unified hierarchy yet:
    
     * https://github.com/opencontainers/runc/issues/1175
     * https://github.com/docker/docker/issues/28109
     * https://github.com/lxc/lxc/issues/1280
    
    So revert the default to the legacy hierarchy for now. Developers of the above
    software can opt into the unified hierarchy with
    "systemd.legacy_systemd_cgroup_controller=0".

diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
index 5e7375393..dc1302511 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
@@ -2423,10 +2423,10 @@ bool cg_is_unified_systemd_controller_wanted(void) {
 
                 r = get_proc_cmdline_key("systemd.legacy_systemd_cgroup_controller=", &value);
                 if (r < 0)
-                        return true;
+                        return false;
 
                 if (r == 0)
-                        wanted = true;
+                        wanted = false;
                 else
                         wanted = parse_boolean(value) <= 0;
         }
commit abd67ce74858491565cde157c7b08fda43d3279c
Author: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Date:   Fri Nov 11 10:54:54 2016 -0500

    basic/virt: fix userns check on CONFIG_USER_NS=n kernel (#4651)
    
    ENOENT should be treated as "false", but because of the broken errno check it
    was treated as an error. So ConditionVirtualization=user-namespaces probably
    returned the correct answer, but only by accident.
    
    Fixes #4608.

diff --git a/src/basic/virt.c b/src/basic/virt.c
index 69b0f9618..d8d57381a 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -496,7 +496,7 @@ static int userns_has_mapping(const char *name) {
         f = fopen(name, "re");
         if (!f) {
                 log_debug_errno(errno, "Failed to open %s: %m", name);
-                return errno == -ENOENT ? false : -errno;
+                return errno == ENOENT ? false : -errno;
         }
 
         n = getline(&buf, &n_allocated, f);
commit 4318abe8d26e969ebdb97744a63ab900233a0185
Author: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Date:   Sat Nov 12 10:05:24 2016 -0500

    build-sys: do not install ctrl-alt-del.target symlink twice
    
    It was a harmless but pointless duplication. Fixes #4655.
    
    Note: in general we try to install as little as possible in
    /etc/systemd/{system,user}. We only install .wants links there for units which
    are "user configurable", i.e. which have an [Install] section. Most our units
    and aliases are not user configurable, do not have an [Install] section, and
    must be symlinked statically during installation. A few units do have an
    [Install] section, and are enabled through symlinks in /etc/ during
    installation using GENERAL_ALIASES. It *would* be possible to not create those
    symlinks, and instead require 'systemctl preset' to be invoked after
    installation, but GENERAL_ALIASES works well enough.

diff --git a/Makefile.am b/Makefile.am
index 50da45891..82879a17e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -633,7 +633,6 @@ EXTRA_DIST += \
 	units/halt-local.service.in
 
 GENERAL_ALIASES += \
-	$(systemunitdir)/reboot.target $(pkgsysconfdir)/system/ctrl-alt-del.target \
 	$(systemunitdir)/machines.target $(pkgsysconfdir)/system/multi-user.target.wants/machines.target
 
 dist_doc_DATA = \
commit d112eae7da77899be245ab52aa1747d4675549f1
Author: Dave Reisner <d@falconindy.com>
Date:   Sun Nov 27 17:05:39 2016 -0500

    device: Avoid calling unit_free(NULL) in device setup logic (#4748)
    
    Since a581e45ae8f9bb5c, there's a few function calls to
    unit_new_for_name which will unit_free on failure. Prior to this commit,
    a failure would result in calling unit_free with a NULL unit, and hit an
    assertion failure, seen at least via device_setup_unit:
    
    Assertion 'u' failed at src/core/unit.c:519, function unit_free().  Aborting.
    
    Fixes #4747
    https://bugs.archlinux.org/task/51950

diff --git a/src/core/device.c b/src/core/device.c
index 074e93ffe..8e2e3c7be 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -359,7 +359,7 @@ static int device_setup_unit(Manager *m, struct udev_device *dev, const char *pa
 fail:
         log_unit_warning_errno(u, r, "Failed to set up device unit: %m");
 
-        if (delete)
+        if (delete && u)
                 unit_free(u);
 
         return r;
commit cfed63f60dd7412c199652825ed172c319b02b3c
Author: Martin Pitt <martin.pitt@ubuntu.com>
Date:   Tue Nov 8 05:31:55 2016 +0100

    nspawn: fix exit code for --help and --version (#4609)
    
    Commit b006762 inverted the initial exit code which is relevant for --help and
    --version without a particular reason.  For these special options, parse_argv()
    returns 0 so that our main() immediately skips to the end without adjusting
    "ret". Otherwise, if an actual container is being started, ret is set on error
    in run(), which still provides the "non-zero exit on error" behaviour.
    
    Fixes #4605.

diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 673e61691..1563644e4 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -4033,7 +4033,7 @@ int main(int argc, char *argv[]) {
         bool root_device_rw = true, home_device_rw = true, srv_device_rw = true;
         _cleanup_close_ int master = -1, image_fd = -1;
         _cleanup_fdset_free_ FDSet *fds = NULL;
-        int r, n_fd_passed, loop_nr = -1, ret = EXIT_FAILURE;
+        int r, n_fd_passed, loop_nr = -1, ret = EXIT_SUCCESS;
         char veth_name[IFNAMSIZ] = "";
         bool secondary = false, remove_subvol = false;
         pid_t pid = 0;
commit 3099caf2b5bb9498b1d0227c40926435ca81f26f
Author: Franck Bui <fbui@suse.com>
Date:   Fri Dec 2 18:40:10 2016 +0100

    journal: make sure to initially populate the space info cache (#4807)
    
    Make sure to populate the cache in cache_space_refresh() at least once
    otherwise it's possible that the system boots fast enough (and the journal
    flush service is finished) before the invalidate cache timeout (30 us) has
    expired.
    
    Fixes: #4790

diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 28487a945..5c6941ebd 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -144,7 +144,7 @@ static int cache_space_refresh(Server *s, JournalStorage *storage) {
 
         ts = now(CLOCK_MONOTONIC);
 
-        if (space->timestamp + RECHECK_SPACE_USEC > ts)
+        if (space->timestamp != 0 && space->timestamp + RECHECK_SPACE_USEC > ts)
                 return 0;
 
         r = determine_path_usage(s, storage->path, &vfs_used, &vfs_avail);
commit 3d4cf7de48a74726694abbaa09f9804b845ff3ba
Author: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Date:   Wed Nov 23 10:18:30 2016 -0500

    build-sys: check for lz4 in the old and new numbering scheme (#4717)
    
    lz4 upstream decided to switch to an incompatible numbering scheme
    (1.7.3 follows 131, to match the so version).
    PKG_CHECK_MODULES does not allow two version matches for the same package,
    so e.g. lz4 < 10 || lz4 >= 125 cannot be used. Check twice, once for
    "new" numbers (anything below 10 is assume to be new), once for the "old"
    numbers (anything above >= 125). This assumes that the "new" versioning
    will not get to 10 to quickly. I think that's a safe assumption, lz4 is a
    mature project.
    
    Fixed #4690.

diff --git a/configure.ac b/configure.ac
index 65eaae1ae..5979de4dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -621,10 +621,13 @@ AM_CONDITIONAL(HAVE_BZIP2, [test "$have_bzip2" = "yes"])
 have_lz4=no
 AC_ARG_ENABLE(lz4, AS_HELP_STRING([--disable-lz4], [disable optional LZ4 support]))
 AS_IF([test "x$enable_lz4" != "xno"], [
-        PKG_CHECK_MODULES(LZ4, [ liblz4 >= 125 ],
-               [AC_DEFINE(HAVE_LZ4, 1, [Define in LZ4 is available])
+        PKG_CHECK_MODULES(LZ4, [ liblz4 < 10 ],
+               [AC_DEFINE(HAVE_LZ4, 1, [Define if LZ4 is available])
                 have_lz4=yes],
-                have_lz4=no)
+                [PKG_CHECK_MODULES(LZ4, [ liblz4 >= 125 ],
+                      [AC_DEFINE(HAVE_LZ4, 1, [Define if LZ4 is available])
+                      have_lz4=yes],
+                      have_lz4=no)])
         AS_IF([test "x$have_lz4" = xno -a "x$enable_lz4" = xyes],
               [AC_MSG_ERROR([*** LZ4 support requested but libraries not found])])
 ])
From 7ec42a45410cb27140292d85ebb0e4b6dcea5555 Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Wed, 7 Dec 2016 13:45:48 -0500
Subject: [PATCH] nspawn: don't hide --bind=/tmp/* mounts

This is a v232-applicable version of upstream c9fd987279a462e.
---
 src/nspawn/nspawn-mount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c
index 115de64..2dabe2a 100644
--- a/src/nspawn/nspawn-mount.c
+++ b/src/nspawn/nspawn-mount.c
@@ -382,7 +382,7 @@ int mount_all(const char *dest,
                 { "tmpfs",               "/dev",                "tmpfs", "mode=755",  MS_NOSUID|MS_STRICTATIME,                                  true,  false, false },
                 { "tmpfs",               "/dev/shm",            "tmpfs", "mode=1777", MS_NOSUID|MS_NODEV|MS_STRICTATIME,                         true,  false, false },
                 { "tmpfs",               "/run",                "tmpfs", "mode=755",  MS_NOSUID|MS_NODEV|MS_STRICTATIME,                         true,  false, false },
-                { "tmpfs",               "/tmp",                "tmpfs", "mode=1777", MS_STRICTATIME,                                            true,  true,  false },
+                { "tmpfs",               "/tmp",                "tmpfs", "mode=1777", MS_STRICTATIME,                                            true,  false,  false },
 #ifdef HAVE_SELINUX
                 { "/sys/fs/selinux",     "/sys/fs/selinux",     NULL,     NULL,       MS_BIND,                                                   false, false, false },  /* Bind mount first */
                 { NULL,                  "/sys/fs/selinux",     NULL,     NULL,       MS_BIND|MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_REMOUNT, false, false, false },  /* Then, make it r/o */
-- 
2.10.2

From ff59e06f9423af0532aaeedf931474823f764875 Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Wed, 9 Nov 2016 08:00:26 -0500
Subject: [PATCH] disable RestrictAddressFamilies on i686

Shit's broke, yo.

https://github.com/systemd/systemd/issues/4575
---
 src/core/execute.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/core/execute.c b/src/core/execute.c
index f666f7c..7d09154 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -1254,6 +1254,10 @@ static int apply_address_families(const Unit* u, const ExecContext *c) {
         Iterator i;
         int r;
 
+#if defined(__i386__)
+        return 0;
+#endif
+
         assert(c);
 
         if (skip_seccomp_unavailable(u, "RestrictAddressFamilies="))
-- 
2.10.2

From 481712d9ee88395042f0640f272c1f87142bc0a8 Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Wed, 9 Nov 2016 11:14:03 -0500
Subject: [PATCH] Revert "nspawn: try to bind mount resolved's resolv.conf
 snippet into the container"

This reverts commit 3539724c26a1b2b00c4eb3c004b635a4b8647de6.
---
 src/nspawn/nspawn.c | 27 ++++++++-------------------
 1 file changed, 8 insertions(+), 19 deletions(-)

diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index c8b18bc..93df7c6 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1309,35 +1309,24 @@ static int setup_resolv_conf(const char *dest) {
         /* Fix resolv.conf, if possible */
         where = prefix_roota(dest, "/etc/resolv.conf");
 
-        if (access("/usr/lib/systemd/resolv.conf", F_OK) >= 0) {
-                /* resolved is enabled on the host. In this, case bind mount its static resolv.conf file into the
-                 * container, so that the container can use the host's resolver. Given that network namespacing is
-                 * disabled it's only natural of the container also uses the host's resolver. It also has the big
-                 * advantage that the container will be able to follow the host's DNS server configuration changes
-                 * transparently. */
-
-                r = mount_verbose(LOG_WARNING, "/usr/lib/systemd/resolv.conf", where, NULL, MS_BIND, NULL);
-                if (r >= 0)
-                        return mount_verbose(LOG_ERR, NULL, where, NULL,
-                                             MS_BIND|MS_REMOUNT|MS_RDONLY|MS_NOSUID|MS_NODEV, NULL);
-        }
-
-        /* If that didn't work, let's copy the file */
         r = copy_file("/etc/resolv.conf", where, O_TRUNC|O_NOFOLLOW, 0644, 0);
         if (r < 0) {
-                /* If the file already exists as symlink, let's suppress the warning, under the assumption that
-                 * resolved or something similar runs inside and the symlink points there.
+                /* If the file already exists as symlink, let's
+                 * suppress the warning, under the assumption that
+                 * resolved or something similar runs inside and the
+                 * symlink points there.
                  *
-                 * If the disk image is read-only, there's also no point in complaining.
+                 * If the disk image is read-only, there's also no
+                 * point in complaining.
                  */
                 log_full_errno(IN_SET(r, -ELOOP, -EROFS) ? LOG_DEBUG : LOG_WARNING, r,
-                               "Failed to copy /etc/resolv.conf to %s, ignoring: %m", where);
+                               "Failed to copy /etc/resolv.conf to %s: %m", where);
                 return 0;
         }
 
         r = userns_lchown(where, 0, 0);
         if (r < 0)
-                log_warning_errno(r, "Failed to chown /etc/resolv.conf, ignoring: %m");
+                log_warning_errno(r, "Failed to chown /etc/resolv.conf: %m");
 
         return 0;
 }
-- 
2.10.2

From 016fb3b83b861cfe58694996076a9764dcb46475 Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppymaster@gmail.com>
Date: Tue, 10 Jan 2017 02:39:05 -0500
Subject: [PATCH 2/2] 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: https://github.com/systemd/systemd/issues/5039
---
 configure.ac                     | 22 ++++++++++++++++++++++
 src/basic/af-list.c              |  2 +-
 src/basic/arphrd-list.c          |  2 +-
 src/basic/cap-list.c             |  2 +-
 src/basic/errno-list.c           |  2 +-
 src/core/load-fragment.h         |  2 +-
 src/journal/journald-server.h    |  2 +-
 src/login/logind.h               |  2 +-
 src/network/networkd-conf.h      |  2 +-
 src/network/networkd-netdev.h    |  2 +-
 src/network/networkd-network.h   |  2 +-
 src/nspawn/nspawn-settings.h     |  2 +-
 src/resolve/dns-type.c           |  2 +-
 src/resolve/resolved-conf.h      |  2 +-
 src/test/test-af-list.c          |  2 +-
 src/test/test-arphrd-list.c      |  2 +-
 src/timesync/timesyncd-conf.h    |  2 +-
 src/udev/net/link-config.h       |  2 +-
 src/udev/udev-builtin-keyboard.c |  2 +-
 19 files changed, 40 insertions(+), 18 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1928e65bd..5c639e32d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -258,6 +258,28 @@ AC_CHECK_SIZEOF(rlim_t,,[
        #include <sys/resource.h>
 ])
 
+GPERF_TEST="$(echo foo,bar | ${GPERF} -L ANSI-C)"
+
+AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM([
+                #include <string.h>
+                const char * in_word_set(const char *, size_t);
+                $GPERF_TEST]
+        )],
+        [GPERF_LEN_TYPE=size_t],
+        [AC_COMPILE_IFELSE(
+                [AC_LANG_PROGRAM([
+                        #include <string.h>
+                        const char * in_word_set(const char *, unsigned);
+                        $GPERF_TEST]
+                )],
+                [GPERF_LEN_TYPE=unsigned],
+                [AC_MSG_ERROR([** unable to determine gperf len type])]
+        )]
+)
+
+AC_DEFINE_UNQUOTED([GPERF_LEN_TYPE], [$GPERF_LEN_TYPE], [gperf len type])
+
 # ------------------------------------------------------------------------------
 # we use python to build the man page index
 have_python=no
diff --git a/src/basic/af-list.c b/src/basic/af-list.c
index 3fac9c508..4b291d177 100644
--- a/src/basic/af-list.c
+++ b/src/basic/af-list.c
@@ -23,7 +23,7 @@
 #include "af-list.h"
 #include "macro.h"
 
-static const struct af_name* lookup_af(register const char *str, register unsigned int len);
+static const struct af_name* lookup_af(register const char *str, register GPERF_LEN_TYPE len);
 
 #include "af-from-name.h"
 #include "af-to-name.h"
diff --git a/src/basic/arphrd-list.c b/src/basic/arphrd-list.c
index 6792d1ee3..2d598dc66 100644
--- a/src/basic/arphrd-list.c
+++ b/src/basic/arphrd-list.c
@@ -23,7 +23,7 @@
 #include "arphrd-list.h"
 #include "macro.h"
 
-static const struct arphrd_name* lookup_arphrd(register const char *str, register unsigned int len);
+static const struct arphrd_name* lookup_arphrd(register const char *str, register GPERF_LEN_TYPE len);
 
 #include "arphrd-from-name.h"
 #include "arphrd-to-name.h"
diff --git a/src/basic/cap-list.c b/src/basic/cap-list.c
index 3e773a06f..d68cc78d0 100644
--- a/src/basic/cap-list.c
+++ b/src/basic/cap-list.c
@@ -26,7 +26,7 @@
 #include "parse-util.h"
 #include "util.h"
 
-static const struct capability_name* lookup_capability(register const char *str, register unsigned int len);
+static const struct capability_name* lookup_capability(register const char *str, register GPERF_LEN_TYPE len);
 
 #include "cap-from-name.h"
 #include "cap-to-name.h"
diff --git a/src/basic/errno-list.c b/src/basic/errno-list.c
index 31b66bad5..c6a01eec8 100644
--- a/src/basic/errno-list.c
+++ b/src/basic/errno-list.c
@@ -23,7 +23,7 @@
 #include "macro.h"
 
 static const struct errno_name* lookup_errno(register const char *str,
-                                             register unsigned int len);
+                                             register GPERF_LEN_TYPE len);
 
 #include "errno-from-name.h"
 #include "errno-to-name.h"
diff --git a/src/core/load-fragment.h b/src/core/load-fragment.h
index c05f205c3..ede6b1f73 100644
--- a/src/core/load-fragment.h
+++ b/src/core/load-fragment.h
@@ -118,7 +118,7 @@ int config_parse_user_group(const char *unit, const char *filename, unsigned lin
 int config_parse_user_group_strv(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 
 /* gperf prototypes */
-const struct ConfigPerfItem* load_fragment_gperf_lookup(const char *key, unsigned length);
+const struct ConfigPerfItem* load_fragment_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
 extern const char load_fragment_gperf_nulstr[];
 
 typedef enum Disabled {
diff --git a/src/journal/journald-server.h b/src/journal/journald-server.h
index 99d91496b..d1520c45d 100644
--- a/src/journal/journald-server.h
+++ b/src/journal/journald-server.h
@@ -179,7 +179,7 @@ void server_dispatch_message(Server *s, struct iovec *iovec, unsigned n, unsigne
 void server_driver_message(Server *s, sd_id128_t message_id, const char *format, ...) _printf_(3,0) _sentinel_;
 
 /* gperf lookup function */
-const struct ConfigPerfItem* journald_gperf_lookup(const char *key, unsigned length);
+const struct ConfigPerfItem* journald_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
 
 int config_parse_storage(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 
diff --git a/src/login/logind.h b/src/login/logind.h
index 086fa1eeb..7556ee2e4 100644
--- a/src/login/logind.h
+++ b/src/login/logind.h
@@ -182,7 +182,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 *key, unsigned length);
+const struct ConfigPerfItem* logind_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
 
 int manager_set_lid_switch_ignore(Manager *m, usec_t until);
 
diff --git a/src/network/networkd-conf.h b/src/network/networkd-conf.h
index c7bfb42a7..00ddb7672 100644
--- a/src/network/networkd-conf.h
+++ b/src/network/networkd-conf.h
@@ -23,7 +23,7 @@
 
 int manager_parse_config_file(Manager *m);
 
-const struct ConfigPerfItem* networkd_gperf_lookup(const char *key, unsigned length);
+const struct ConfigPerfItem* networkd_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
 
 int config_parse_duid_type(
                 const char *unit,
diff --git a/src/network/networkd-netdev.h b/src/network/networkd-netdev.h
index 70ff947b9..37c743121 100644
--- a/src/network/networkd-netdev.h
+++ b/src/network/networkd-netdev.h
@@ -175,7 +175,7 @@ NetDevKind netdev_kind_from_string(const char *d) _pure_;
 int config_parse_netdev_kind(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 
 /* gperf */
-const struct ConfigPerfItem* network_netdev_gperf_lookup(const char *key, unsigned length);
+const struct ConfigPerfItem* network_netdev_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
 
 /* Macros which append INTERFACE= to the message */
 
diff --git a/src/network/networkd-network.h b/src/network/networkd-network.h
index 42fc82d39..09c3b3a3a 100644
--- a/src/network/networkd-network.h
+++ b/src/network/networkd-network.h
@@ -236,7 +236,7 @@ int config_parse_dhcp_route_table(const char *unit, const char *filename, unsign
 /* Legacy IPv4LL support */
 int config_parse_ipv4ll(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 
-const struct ConfigPerfItem* network_network_gperf_lookup(const char *key, unsigned length);
+const struct ConfigPerfItem* network_network_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
 
 extern const sd_bus_vtable network_vtable[];
 
diff --git a/src/nspawn/nspawn-settings.h b/src/nspawn/nspawn-settings.h
index 231e6d726..4ae34f8e2 100644
--- a/src/nspawn/nspawn-settings.h
+++ b/src/nspawn/nspawn-settings.h
@@ -103,7 +103,7 @@ bool settings_private_network(Settings *s);
 
 DEFINE_TRIVIAL_CLEANUP_FUNC(Settings*, settings_free);
 
-const struct ConfigPerfItem* nspawn_gperf_lookup(const char *key, unsigned length);
+const struct ConfigPerfItem* nspawn_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
 
 int config_parse_capability(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 int config_parse_id128(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
diff --git a/src/resolve/dns-type.c b/src/resolve/dns-type.c
index aaf5ed62c..d89ae28dc 100644
--- a/src/resolve/dns-type.c
+++ b/src/resolve/dns-type.c
@@ -29,7 +29,7 @@ typedef const struct {
 } dns_type;
 
 static const struct dns_type_name *
-lookup_dns_type (register const char *str, register unsigned int len);
+lookup_dns_type (register const char *str, register GPERF_LEN_TYPE len);
 
 #include "dns_type-from-name.h"
 #include "dns_type-to-name.h"
diff --git a/src/resolve/resolved-conf.h b/src/resolve/resolved-conf.h
index fc425a36b..8184d6cad 100644
--- a/src/resolve/resolved-conf.h
+++ b/src/resolve/resolved-conf.h
@@ -41,7 +41,7 @@ int manager_parse_search_domains_and_warn(Manager *m, const char *string);
 int manager_add_dns_server_by_string(Manager *m, DnsServerType type, const char *word);
 int manager_parse_dns_server_string_and_warn(Manager *m, DnsServerType type, const char *string);
 
-const struct ConfigPerfItem* resolved_gperf_lookup(const char *key, unsigned length);
+const struct ConfigPerfItem* resolved_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
 
 int config_parse_dns_servers(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 int config_parse_search_domains(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
diff --git a/src/test/test-af-list.c b/src/test/test-af-list.c
index aeaa0929b..e2479133d 100644
--- a/src/test/test-af-list.c
+++ b/src/test/test-af-list.c
@@ -24,7 +24,7 @@
 #include "string-util.h"
 #include "util.h"
 
-static const struct af_name* lookup_af(register const char *str, register unsigned int len);
+static const struct af_name* lookup_af(register const char *str, register GPERF_LEN_TYPE len);
 
 #include "af-from-name.h"
 #include "af-list.h"
diff --git a/src/test/test-arphrd-list.c b/src/test/test-arphrd-list.c
index f3989ad20..8f4f342fa 100644
--- a/src/test/test-arphrd-list.c
+++ b/src/test/test-arphrd-list.c
@@ -24,7 +24,7 @@
 #include "string-util.h"
 #include "util.h"
 
-static const struct arphrd_name* lookup_arphrd(register const char *str, register unsigned int len);
+static const struct arphrd_name* lookup_arphrd(register const char *str, register GPERF_LEN_TYPE len);
 
 #include "arphrd-from-name.h"
 #include "arphrd-list.h"
diff --git a/src/timesync/timesyncd-conf.h b/src/timesync/timesyncd-conf.h
index cba0724b1..0280697e9 100644
--- a/src/timesync/timesyncd-conf.h
+++ b/src/timesync/timesyncd-conf.h
@@ -22,7 +22,7 @@
 #include "conf-parser.h"
 #include "timesyncd-manager.h"
 
-const struct ConfigPerfItem* timesyncd_gperf_lookup(const char *key, unsigned length);
+const struct ConfigPerfItem* timesyncd_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
 
 int manager_parse_server_string(Manager *m, ServerType type, const char *string);
 
diff --git a/src/udev/net/link-config.h b/src/udev/net/link-config.h
index 91cc0357c..b0d8ceb76 100644
--- a/src/udev/net/link-config.h
+++ b/src/udev/net/link-config.h
@@ -93,7 +93,7 @@ const char *mac_policy_to_string(MACPolicy p) _const_;
 MACPolicy mac_policy_from_string(const char *p) _pure_;
 
 /* gperf lookup function */
-const struct ConfigPerfItem* link_config_gperf_lookup(const char *key, unsigned length);
+const struct ConfigPerfItem* link_config_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
 
 int config_parse_mac_policy(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 int config_parse_name_policy(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
diff --git a/src/udev/udev-builtin-keyboard.c b/src/udev/udev-builtin-keyboard.c
index aa10beafb..09024116f 100644
--- a/src/udev/udev-builtin-keyboard.c
+++ b/src/udev/udev-builtin-keyboard.c
@@ -29,7 +29,7 @@
 #include "string-util.h"
 #include "udev.h"
 
-static const struct key *keyboard_lookup_key(const char *str, unsigned len);
+static const struct key *keyboard_lookup_key(const char *str, GPERF_LEN_TYPE len);
 #include "keyboard-keys-from-name.h"
 
 static int install_force_release(struct udev_device *dev, const unsigned *release, unsigned release_count) {
-- 
2.11.0

