From: Amos Jeffries Date: Mon, 13 May 2013 16:36:33 +0000 (-0600) Subject: Windows: MinGW supplies statfs X-Git-Tag: SQUID_3_4_0_1~148 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d739563823b44ae5ebba3d597f549b4afbedd5a;p=thirdparty%2Fsquid.git Windows: MinGW supplies statfs This fixes compile errors with shadowed definitions: error: 'int statfs(const char*, statfs*)' hides constructor for 'struct statfs' [-Werror=shadow] --- diff --git a/compat/mswindows.cc b/compat/mswindows.cc index 4620fe9a0d..3d9833394c 100644 --- a/compat/mswindows.cc +++ b/compat/mswindows.cc @@ -148,6 +148,7 @@ gettimeofday(struct timeval *pcur_time, void *tzp) } #endif /* !HAVE_GETTIMEOFDAY */ +#if !_SQUID_MINGW_ int statfs(const char *path, struct statfs *sfs) { @@ -181,6 +182,7 @@ statfs(const char *path, struct statfs *sfs) sfs->f_namelen = maxlen; return 0; } +#endif #if !_SQUID_MINGW_ int diff --git a/compat/os/mswindows.h b/compat/os/mswindows.h index bf805944cf..af247c6070 100644 --- a/compat/os/mswindows.h +++ b/compat/os/mswindows.h @@ -212,6 +212,7 @@ struct group { char **gr_mem; /* group members */ }; +#if !_SQUID_MINGW_ struct statfs { long f_type; /* type of filesystem (see below) */ long f_bsize; /* optimal transfer block size */ @@ -224,6 +225,7 @@ struct statfs { long f_namelen; /* maximum length of filenames */ long f_spare[6]; /* spare for later */ }; +#endif #if !HAVE_GETTIMEOFDAY struct timezone { @@ -807,7 +809,9 @@ struct rusage { SQUIDCEXTERN int chroot(const char *dirname); SQUIDCEXTERN int kill(pid_t, int); +#if !_SQUID_MINGW_ SQUIDCEXTERN int statfs(const char *, struct statfs *); +#endif SQUIDCEXTERN struct passwd * getpwnam(char *unused); SQUIDCEXTERN struct group * getgrnam(char *unused);