]> git.ipfire.org Git - people/ms/dhcpcd.git/commitdiff
src/dhcpcd.c: fix build without fork
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Mon, 13 Jul 2020 08:43:51 +0000 (10:43 +0200)
committerRoy Marples <roy@marples.name>
Sat, 1 Aug 2020 19:53:11 +0000 (20:53 +0100)
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
src/dhcpcd.c

index ee585aa48066b996edc9973120f82ebe0bef5a9d..b597a5c01e69eb57e702400e31c3203e5a55f2d1 100644 (file)
@@ -336,7 +336,7 @@ dhcpcd_daemonise(struct dhcpcd_ctx *ctx)
 #ifdef THERE_IS_NO_FORK
        eloop_timeout_delete(ctx->eloop, handle_exit_timeout, ctx);
        errno = ENOSYS;
-       return 0;
+       return;
 #else
        int i;
        unsigned int logopts = loggetopts();
@@ -2211,7 +2211,7 @@ printpidfile:
        ps_init(&ctx);
 #endif
 
-#ifdef USE_SIGNALS
+#if defined(USE_SIGNALS) && !defined(THERE_IS_NO_FORK)
        if (pipe(sigpipe) == -1) {
                logerr("pipe");
                goto exit_failure;