Mercurial > hg > dhcpcd
comparison src/dhcpcd.c @ 5566:e90bef3160d7 draft
src/dhcpcd.c: fix build without fork or signals (#20)
Since version 9.3.3 and commit a5348dd02c86fa940cd93f203d0aa974cae0563c,
build without fork or signals fails on:
dhcpcd.c: In function ?main?:
dhcpcd.c:2261:3: error: label ?start_master? used but not defined
goto start_master;
^~~~
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
| author | Fabrice Fontaine <fontaine.fabrice@gmail.com> |
|---|---|
| date | Sat, 26 Dec 2020 20:45:08 +0100 |
| parents | 301bcad7c710 |
| children | 4fe5c2a71254 |
comparison
equal
deleted
inserted
replaced
| 5565:8f7592a6f80d | 5566:e90bef3160d7 |
|---|---|
| 2308 | 2308 |
| 2309 loginfox(PACKAGE "-" VERSION " starting"); | 2309 loginfox(PACKAGE "-" VERSION " starting"); |
| 2310 if (ctx.stdin_valid && freopen(_PATH_DEVNULL, "w", stdin) == NULL) | 2310 if (ctx.stdin_valid && freopen(_PATH_DEVNULL, "w", stdin) == NULL) |
| 2311 logwarn("freopen stdin"); | 2311 logwarn("freopen stdin"); |
| 2312 | 2312 |
| 2313 #if defined(USE_SIGNALS) && !defined(THERE_IS_NO_FORK) | |
| 2313 if (!(ctx.options & DHCPCD_DAEMONISE)) | 2314 if (!(ctx.options & DHCPCD_DAEMONISE)) |
| 2314 goto start_master; | 2315 goto start_master; |
| 2315 | 2316 |
| 2316 #if defined(USE_SIGNALS) && !defined(THERE_IS_NO_FORK) | |
| 2317 if (xsocketpair(AF_UNIX, SOCK_DGRAM | SOCK_CXNB, 0, fork_fd) == -1 || | 2317 if (xsocketpair(AF_UNIX, SOCK_DGRAM | SOCK_CXNB, 0, fork_fd) == -1 || |
| 2318 (ctx.stderr_valid && | 2318 (ctx.stderr_valid && |
| 2319 xsocketpair(AF_UNIX, SOCK_DGRAM | SOCK_CXNB, 0, stderr_fd) == -1)) | 2319 xsocketpair(AF_UNIX, SOCK_DGRAM | SOCK_CXNB, 0, stderr_fd) == -1)) |
| 2320 { | 2320 { |
| 2321 logerr("socketpair"); | 2321 logerr("socketpair"); |
