summaryrefslogtreecommitdiffstats
path: root/bind.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-09-05 13:12:35 +0000
committerRoy Marples <roy@marples.name>2008-09-05 13:12:35 +0000
commitf6de5860b6c6a47c21d09ee4203895f182c01eaa (patch)
tree92744ef6e22857713422dcf2ae731911a5e451f0 /bind.c
parent99d755f98fbd68ea54a199f5ce27516e37108cd1 (diff)
downloaddhcpcd-f6de5860b6c6a47c21d09ee4203895f182c01eaa.tar.xz
As our logger calls emulate syslog, we can use %m. However, this means we have to convert it for printf as POSIX does not require that printf supports it. This also means we drop -pedantic from our GCC flags.
Diffstat (limited to 'bind.c')
-rw-r--r--bind.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/bind.c b/bind.c
index 8d058d11..a5d22592 100644
--- a/bind.c
+++ b/bind.c
@@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
-#include <errno.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
@@ -58,13 +57,13 @@ daemonise(void)
sigprocmask(SIG_SETMASK, &full, &old);
/* Setup a signal pipe so parent knows when to exit. */
if (pipe(sidpipe) == -1) {
- logger(LOG_ERR, "pipe: %s", strerror(errno));
+ logger(LOG_ERR, "pipe: %m");
return -1;
}
logger(LOG_INFO, "forking to background");
switch (pid = fork()) {
case -1:
- logger(LOG_ERR, "fork: %s", strerror(errno));
+ logger(LOG_ERR, "fork: %m");
exit(EXIT_FAILURE);
/* NOTREACHED */
case 0: