changeset 5410:e7ca98611c22 draft

src/dhcpcd.c: fix build without fork Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
author Fabrice Fontaine <fontaine.fabrice@gmail.com>
date Mon, 13 Jul 2020 10:43:51 +0200
parents 571dbb02e7c5
children c222e3e77e93
files src/dhcpcd.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/dhcpcd.c	Sat Aug 01 20:32:34 2020 +0100
+++ b/src/dhcpcd.c	Mon Jul 13 10:43:51 2020 +0200
@@ -336,7 +336,7 @@
 #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 @@
 	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;