]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Include unistd.h only if HAVE_UNISTD_H is defined 823/head
authorWolfgang Stöggl <c72578@yahoo.de>
Wed, 20 Sep 2017 08:40:03 +0000 (10:40 +0200)
committerWolfgang Stöggl <c72578@yahoo.de>
Wed, 20 Sep 2017 08:40:03 +0000 (10:40 +0200)
- Fixes compilation error, when building under Windows (e.g. VS2015):
  ..\src\rrd_create.c(18): fatal error C1083: Cannot open include file:
  'unistd.h': No such file or directory

src/rrd_create.c

index e6226014a906796cd3acf13dd41e47d96af6414e..9453cbcf6814cb328c9a47b86abcb8f2e0e03d9b 100644 (file)
@@ -15,7 +15,9 @@
 
 #include <sys/types.h>      // stat()
 #include <sys/stat.h>       // stat()
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>         // stat()
+#endif
 
 #include "rrd_strtod.h"
 #include "rrd_tool.h"