>From f8c23f202d11992182e87736e73929bcc369cc75 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 16 Sep 2020 23:52:44 +0200 Subject: [PATCH 2/2] 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. --- ChangeLog | 8 ++++++++ lib/stat-w32.c | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 57501d5..d18ec51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 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. Reported by Eli Zaretskii in . diff --git a/lib/stat-w32.c b/lib/stat-w32.c index 72442e9..108ce19 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. */ -- 2.7.4