summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-09-16 23:52:44 +0200
committerBruno Haible <bruno@clisp.org>2020-09-16 23:52:44 +0200
commitf8c23f202d11992182e87736e73929bcc369cc75 (patch)
tree0e6bdcf6f44f34d78b4b6b78ddc017013ec487a5 /lib
parent1796cda9975bd459a87222676030b943869c686e (diff)
downloadgnulib-f8c23f202d11992182e87736e73929bcc369cc75.tar.gz
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/stat-w32.c5
1 files changed, 5 insertions, 0 deletions
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. */