File: hurd-f_type.diff

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (27 lines) | stat: -rw-r--r-- 1,147 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
https://github.com/llvm/llvm-project/pull/71851

commit 620b8d994b8abdcf31271d9f4db7e7422fc9bd65
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Mon Sep 9 15:53:33 2024 +0200

    [hurd] Fix accessing f_type field of statvfs (#71851)
    
    f4719c4d2cda ("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.

diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc
index 8098392a7fd9..44097bad7b46 100644
--- a/llvm/lib/Support/Unix/Path.inc
+++ b/llvm/lib/Support/Unix/Path.inc
@@ -487,7 +487,7 @@ static bool is_local_impl(struct STATVFS &Vfs) {
 #ifndef CIFS_MAGIC_NUMBER
 #define CIFS_MAGIC_NUMBER 0xFF534D42
 #endif
-#ifdef __GNU__
+#if defined(__GNU__) && ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 39)))
   switch ((uint32_t)Vfs.__f_type) {
 #else
   switch ((uint32_t)Vfs.f_type) {