diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2016-04-21 12:13:08 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-04-21 12:13:08 +0200 |
commit | 48062f072c7ba679667a309a76f71d595f0287e7 (patch) | |
tree | f508de1b849d66927e8e12328bbdb525ba9c2773 /src | |
parent | 964b26fe2127d28713bccf03603900a7691216ba (diff) |
build: fix test-nss.c build failure with --disable-{resolved,myhostname} (#3081)
When building without resolved and/or myhostname, test-nss.c failed to build
with
src/test/test-nss.c: In function 'main':
src/test/test-nss.c:417:32: error: 'MODULE1' undeclared (first use in this function)
NULSTR_FOREACH(module, MODULE1 MODULE2 MODULE3 MODULE4) {
^
Ensure that all MODULEx are always defined, and empty if the module is not
available (so that it will be a no-op in the string concatenation).
Diffstat (limited to 'src')
-rw-r--r-- | src/test/test-nss.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/test-nss.c b/src/test/test-nss.c index 9c13288d2e..55af592287 100644 --- a/src/test/test-nss.c +++ b/src/test/test-nss.c @@ -381,12 +381,18 @@ static void test_byaddr(void *handle, #ifdef HAVE_MYHOSTNAME # define MODULE1 "myhostname\0" +#else +# define MODULE1 #endif #ifdef HAVE_RESOLVED # define MODULE2 "resolve\0" +#else +# define MODULE2 #endif #ifdef HAVE_MACHINED # define MODULE3 "mymachines\0" +#else +# define MODULE3 #endif #define MODULE4 "dns\0" |