From: Wolfgang Stöggl Date: Wed, 20 Sep 2017 08:40:03 +0000 (+0200) Subject: Include unistd.h only if HAVE_UNISTD_H is defined X-Git-Tag: v1.7.1~105^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F823%2Fhead;p=thirdparty%2Frrdtool-1.x.git Include unistd.h only if HAVE_UNISTD_H is defined - 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 --- diff --git a/src/rrd_create.c b/src/rrd_create.c index e6226014..9453cbcf 100644 --- a/src/rrd_create.c +++ b/src/rrd_create.c @@ -15,7 +15,9 @@ #include // stat() #include // stat() +#ifdef HAVE_UNISTD_H #include // stat() +#endif #include "rrd_strtod.h" #include "rrd_tool.h"