summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Nosek <root@localdomain.pl>2009-07-17 12:46:03 +0200
committerGrzegorz Nosek <root@localdomain.pl>2009-07-17 12:46:03 +0200
commit28ac6f9aa5e7dadf9aaf2062ab003a0fb4c82ad8 (patch)
tree84ef3c86c0c3018b7f3c5dc1d1be901085a06aaa
parentb832b0dc41556ab7770b2a440df3a0087daf306b (diff)
downloadfcgiwrap-28ac6f9aa5e7dadf9aaf2062ab003a0fb4c82ad8.tar.xz
fcgiwrap-28ac6f9aa5e7dadf9aaf2062ab003a0fb4c82ad8.zip
Compile fixes for OpenBSD
Thanks to Toni Mueller, original author of the patch
-rw-r--r--fcgiwrap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fcgiwrap.c b/fcgiwrap.c
index 7d77792..16bccda 100644
--- a/fcgiwrap.c
+++ b/fcgiwrap.c
@@ -369,7 +369,8 @@ char *get_cgi_filename() /* and fixup environment */
if ((p = getenv("DOCUMENT_ROOT"))) {
docroot = p;
- buflen += docrootlen = strlen(p);
+ docrootlen = strlen(p);
+ buflen += docrootlen;
} else {
goto err;
}
@@ -519,7 +520,7 @@ static void handle_fcgi_request()
signal(SIGCHLD, SIG_DFL);
signal(SIGPIPE, SIG_DFL);
- execl(filename, filename, NULL);
+ execl(filename, filename, (void *)NULL);
puts("Status: 502 Bad Gateway\nContent-type: text/plain\n\n502");
exit(99);