From: Bruno Haible Date: Wed, 16 Sep 2020 21:52:44 +0000 (+0200) Subject: stat, fstat: Fix compilation error with old mingw headers. X-Git-Tag: v1.0~3632 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=f8c23f202d11992182e87736e73929bcc369cc75;p=gnulib.git stat, fstat: Fix compilation error with old mingw headers. Reported by Eli Zaretskii in . * lib/stat-w32.c (VOLUME_NAME_NONE): Define if the Windows headers don't define it. --- diff --git a/ChangeLog b/ChangeLog index 57501d5566..d18ec51a46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2020-09-16 Bruno Haible + + stat, fstat: Fix compilation error with old mingw headers. + Reported by Eli Zaretskii in + . + * lib/stat-w32.c (VOLUME_NAME_NONE): Define if the Windows headers don't + define it. + 2020-09-16 Bruno Haible stat, fstat: Fix when compiling for versions older than Windows Vista. diff --git a/lib/stat-w32.c b/lib/stat-w32.c index 72442e9335..108ce199cc 100644 --- a/lib/stat-w32.c +++ b/lib/stat-w32.c @@ -58,6 +58,11 @@ #undef GetFinalPathNameByHandle #define GetFinalPathNameByHandle GetFinalPathNameByHandleA +/* Older mingw headers do not define VOLUME_NAME_NONE. */ +#ifndef VOLUME_NAME_NONE +# define VOLUME_NAME_NONE 4 +#endif + #if !WIN32_ASSUME_VISTA /* Avoid warnings from gcc -Wcast-function-type. */