]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Windows: MinGW supplies statfs
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 13 May 2013 16:36:33 +0000 (10:36 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 13 May 2013 16:36:33 +0000 (10:36 -0600)
This fixes compile errors with shadowed definitions:

 error: 'int statfs(const char*, statfs*)'
 hides constructor for 'struct statfs' [-Werror=shadow]

compat/mswindows.cc
compat/os/mswindows.h

index 4620fe9a0d63e21e6754e6e5fb665f5db841bc10..3d9833394c9d604cb6513e44a36237d78ab503b9 100644 (file)
@@ -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
index bf805944cfed9b59cbe5fdcfdcc1648b707daa6d..af247c60705cd2d6c36cb91e251d38f39eb8ee37 100644 (file)
@@ -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);