Skip to content

Commit 620b8d9

Browse files
authored
[hurd] Fix accessing f_type field of statvfs (#71851)
f4719c4 ("Add support for GNU Hurd in Path.inc and other places") made llvm use an internal __f_type name for the f_type field (which it is not supposed to since accessing double-underscore names is explicitly not supported by standards). In glibc 2.39 this field was renamed to f_type so application can now access the field as the standard says.
1 parent eaac4a2 commit 620b8d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Support/Unix/Path.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ static bool is_local_impl(struct STATVFS &Vfs) {
487487
#ifndef CIFS_MAGIC_NUMBER
488488
#define CIFS_MAGIC_NUMBER 0xFF534D42
489489
#endif
490-
#ifdef __GNU__
490+
#if defined(__GNU__) && ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 39)))
491491
switch ((uint32_t)Vfs.__f_type) {
492492
#else
493493
switch ((uint32_t)Vfs.f_type) {

0 commit comments

Comments
 (0)