| From f8c23f202d11992182e87736e73929bcc369cc75 Mon Sep 17 00:00:00 2001 |
| From: Bruno Haible <bruno@clisp.org> |
| 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 <eliz@gnu.org> in |
| <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00027.html>. |
| |
| * lib/stat-w32.c (VOLUME_NAME_NONE): Define if the Windows headers don't |
| define it. |
| --- |
| stat-w32.c | 5 +++++ |
| 2 files changed, 13 insertions(+) |
| |
| diff --git a/gnulib/import/stat-w32.c b/gnulib/import/stat-w32.c |
| index 72442e933..108ce199c 100644 |
| --- a/gnulib/import/stat-w32.c |
| +++ b/gnulib/import/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.17.1 |
| |