]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Cleanup: wrap some C-includes with protective macros
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 14 Sep 2014 14:04:27 +0000 (07:04 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 14 Sep 2014 14:04:27 +0000 (07:04 -0700)
Squid-3 guidelines require that C-header includes should be wrapped
and the absence of wrapping causes build errors on Windows at least for
these ones.

src/ipc/mem/Segment.cc

index c1c0c16c8e2c3b7bef5cb16c796845e7e59049aa..127e7f70b5e7aaa94102ebbaf76202c5415b2cd6 100644 (file)
 #include "SBuf.h"
 #include "tools.h"
 
+#if HAVE_FCNTL_H
 #include <fcntl.h>
+#endif
+#if HAVE_SYS_MMAN_H
 #include <sys/mman.h>
+#endif
+#if HAVE_SYS_STAT_H
 #include <sys/stat.h>
+#endif
+#if HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 
 // test cases change this
 const char *Ipc::Mem::Segment::BasePath = DEFAULT_STATEDIR;