]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
MinGW: add mkdir adapter (#2018)
authorFrancesco Chemolli <5175948+kinkie@users.noreply.github.com>
Fri, 14 Mar 2025 17:21:31 +0000 (17:21 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 14 Mar 2025 23:49:08 +0000 (23:49 +0000)
On Windows, mkdir only takes one argument.
compat/mswindows.h has an adapter, add it to
compat/mingw.h as well.

Solves error:

```
UFSSwapDir.cc:617:26: error: too many arguments
    to function 'int mkdir(const char*)'
mingw/include/io.h:282:15: note: declared here
    int __cdecl mkdir (const char *);
```

compat/os/mingw.h

index fa904a9ec25b0d3e3f6aa1141c29b6eae3a2c616..5bc721b8af89cc9cf5fcf3cbe95a0c42d99841a6 100644 (file)
@@ -46,5 +46,7 @@ fsync(int fd)
 }
 #endif
 
+#define mkdir(p,F) mkdir((p))
+
 #endif /* _SQUID_MINGW_*/
 #endif /* SQUID_COMPAT_OS_MINGW_H */