From: des Date: Mon, 30 Jul 2007 09:49:05 +0000 (+0000) Subject: Avoid using non-portable . X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2bf02f0435bd292fda97478b1a9f6c8a0227fa1f;p=varnish Avoid using non-portable . git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1784 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/mgt_child.c b/varnish-cache/bin/varnishd/mgt_child.c index 75900d15..67fc75dc 100644 --- a/varnish-cache/bin/varnishd/mgt_child.c +++ b/varnish-cache/bin/varnishd/mgt_child.c @@ -42,8 +42,6 @@ #include #include -#include /* XXX */ - #ifndef HAVE_SETPROCTITLE #include "compat/setproctitle.h" #endif @@ -188,8 +186,10 @@ start_child(void) AZ(pipe(child_fds)); MCF_ParamSync(); i = fork(); - if (i < 0) - errx(1, "Could not fork child"); + if (i < 0) { + perror("Could not fork child"); + exit(1); + } if (i == 0) { if (geteuid() == 0) { XXXAZ(setgid(params->gid)); diff --git a/varnish-cache/bin/varnishd/varnishd.c b/varnish-cache/bin/varnishd/varnishd.c index 343478a7..2ef32de2 100644 --- a/varnish-cache/bin/varnishd/varnishd.c +++ b/varnish-cache/bin/varnishd/varnishd.c @@ -31,7 +31,8 @@ * The management process and CLI handling */ -#include +#include + #include #include #include @@ -44,7 +45,6 @@ #include #include #include -#include #ifndef HAVE_DAEMON #include "compat/daemon.h" diff --git a/varnish-cache/lib/libvarnish/vpf.c b/varnish-cache/lib/libvarnish/vpf.c index 20f159e6..857cc7c0 100644 --- a/varnish-cache/lib/libvarnish/vpf.c +++ b/varnish-cache/lib/libvarnish/vpf.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #ifndef HAVE_STRLCPY