diff --git a/src/kernel/reports.c b/src/kernel/reports.c index 0cef0e6af..cb3fa52e4 100644 --- a/src/kernel/reports.c +++ b/src/kernel/reports.c @@ -55,7 +55,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include /* libc includes */ -#include #include #include #include @@ -1726,13 +1725,11 @@ static void write_script(FILE * F, const faction * f) int init_reports(void) { prepare_reports(); -#ifdef HAVE_STAT { - stat_type st; - if (stat(reportpath(), &st) == 0) + if (_access(reportpath(), 0)!=0) { return 0; + } } -#endif if (_mkdir(reportpath()) != 0) { if (errno != EEXIST) { perror("could not create reportpath"); diff --git a/src/report.c b/src/report.c index 73927cf77..415897f3a 100644 --- a/src/report.c +++ b/src/report.c @@ -96,11 +96,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include -#ifdef HAVE_STAT -#include -#include -#endif - extern int verbosity; extern int *storms; extern int weeks_per_month;