From: David Schmidt <david__schmidt@users.sourceforge.net>
Date: Fri, 25 Jan 2013 21:52:02 +0000 (+0000)
Subject: Protect unistd.h with its existence define for platforms that lack it
X-Git-Tag: v_3_0_21~79
X-Git-Url: http://www.privoxy.org/gitweb/developer-manual/static/@default-cgi@toggle?a=commitdiff_plain;h=68b650b4265d93d1e1bbbbe7726c84df39e53d0e;p=privoxy.git

Protect unistd.h with its existence define for platforms that lack it
---

diff --git a/cgisimple.c b/cgisimple.c
index 7855fa02..07017022 100644
--- a/cgisimple.c
+++ b/cgisimple.c
@@ -1,4 +1,4 @@
-const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.117 2012/10/21 12:55:29 fabiankeil Exp $";
+const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.118 2012/12/07 12:45:20 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/cgisimple.c,v $
@@ -6,7 +6,7 @@ const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.117 2012/10/21 12:55:29 fabia
  * Purpose     :  Simple CGIs to get information about Privoxy's
  *                status.
  *
- * Copyright   :  Written by and Copyright (C) 2001-2011 the
+ * Copyright   :  Written by and Copyright (C) 2001-2013 the
  *                Privoxy team. http://www.privoxy.org/
  *
  *                Based on the Internet Junkbuster originally written
@@ -43,9 +43,9 @@ const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.117 2012/10/21 12:55:29 fabia
 #include <string.h>
 #include <assert.h>
 
-#ifdef HAVE_ACCESS
+#if defined (HAVE_ACCESS) && defined (HAVE_UNISTD_H)
 #include <unistd.h>
-#endif /* def HAVE_ACCESS */
+#endif /* def HAVE_ACCESS && HAVE_UNISTD_H */
 
 #include "project.h"
 #include "cgi.h"