0001-src-dhcpcd.c-fix-build-without-fork.patch 992 B

123456789101112131415161718192021222324252627282930313233343536
  1. From 13e475d9847bf7d6a6af62397f67eb269e27613e Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Mon, 13 Jul 2020 10:43:51 +0200
  4. Subject: [PATCH] src/dhcpcd.c: fix build without fork
  5. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  6. [Upstream status: https://github.com/rsmarples/dhcpcd/pull/17]
  7. ---
  8. src/dhcpcd.c | 4 ++--
  9. 1 file changed, 2 insertions(+), 2 deletions(-)
  10. diff --git a/src/dhcpcd.c b/src/dhcpcd.c
  11. index ee585aa4..b597a5c0 100644
  12. --- a/src/dhcpcd.c
  13. +++ b/src/dhcpcd.c
  14. @@ -336,7 +336,7 @@ dhcpcd_daemonise(struct dhcpcd_ctx *ctx)
  15. #ifdef THERE_IS_NO_FORK
  16. eloop_timeout_delete(ctx->eloop, handle_exit_timeout, ctx);
  17. errno = ENOSYS;
  18. - return 0;
  19. + return;
  20. #else
  21. int i;
  22. unsigned int logopts = loggetopts();
  23. @@ -2211,7 +2211,7 @@ printpidfile:
  24. ps_init(&ctx);
  25. #endif
  26. -#ifdef USE_SIGNALS
  27. +#if defined(USE_SIGNALS) && !defined(THERE_IS_NO_FORK)
  28. if (pipe(sigpipe) == -1) {
  29. logerr("pipe");
  30. goto exit_failure;
  31. --
  32. 2.27.0