[libc-commits] [libc] cf9a244 - [libc] Fix non-relative includes of __llvm-libc-common.h (#209412)

via libc-commits libc-commits at lists.llvm.org
Tue Jul 14 05:14:22 PDT 2026


Author: Pavel Labath
Date: 2026-07-14T14:14:17+02:00
New Revision: cf9a244fb2216fb55b77e1df785f6535b44b3e7f

URL: https://github.com/llvm/llvm-project/commit/cf9a244fb2216fb55b77e1df785f6535b44b3e7f
DIFF: https://github.com/llvm/llvm-project/commit/cf9a244fb2216fb55b77e1df785f6535b44b3e7f.diff

LOG: [libc] Fix non-relative includes of __llvm-libc-common.h (#209412)

This seems to work, but I ran into this problem when trying to expand
hermetic tests.

The hdrgen-generated headers already use relative includes of this file.

Added: 
    

Modified: 
    libc/include/llvm-libc-macros/gpu/signal-macros.h
    libc/include/llvm-libc-macros/linux/signal-macros.h
    libc/include/llvm-libc-macros/netinet-in-macros.h
    libc/include/llvm-libc-types/__futex_word.h
    libc/include/sys/prctl.h.def

Removed: 
    


################################################################################
diff  --git a/libc/include/llvm-libc-macros/gpu/signal-macros.h b/libc/include/llvm-libc-macros/gpu/signal-macros.h
index 76488e9796fc4..ab3166454ba13 100644
--- a/libc/include/llvm-libc-macros/gpu/signal-macros.h
+++ b/libc/include/llvm-libc-macros/gpu/signal-macros.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_MACROS_GPU_SIGNAL_MACROS_H
 #define LLVM_LIBC_MACROS_GPU_SIGNAL_MACROS_H
 
-#include "__llvm-libc-common.h"
+#include "../../__llvm-libc-common.h"
 
 #define SIGINT 2
 #define SIGILL 4

diff  --git a/libc/include/llvm-libc-macros/linux/signal-macros.h b/libc/include/llvm-libc-macros/linux/signal-macros.h
index b74d81683ac5e..c3981ff3f8634 100644
--- a/libc/include/llvm-libc-macros/linux/signal-macros.h
+++ b/libc/include/llvm-libc-macros/linux/signal-macros.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_MACROS_LINUX_SIGNAL_MACROS_H
 #define LLVM_LIBC_MACROS_LINUX_SIGNAL_MACROS_H
 
-#include "__llvm-libc-common.h"
+#include "../../__llvm-libc-common.h"
 
 #define SIGHUP 1
 #define SIGINT 2

diff  --git a/libc/include/llvm-libc-macros/netinet-in-macros.h b/libc/include/llvm-libc-macros/netinet-in-macros.h
index 7c9c337fded23..9664d512615b9 100644
--- a/libc/include/llvm-libc-macros/netinet-in-macros.h
+++ b/libc/include/llvm-libc-macros/netinet-in-macros.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_MACROS_NETINET_IN_MACROS_H
 #define LLVM_LIBC_MACROS_NETINET_IN_MACROS_H
 
+#include "../__llvm-libc-common.h"
 #include "../llvm-libc-types/in_addr_t.h"
-#include "__llvm-libc-common.h"
 
 #define IPPROTO_IP 0
 #define IPPROTO_ICMP 1

diff  --git a/libc/include/llvm-libc-types/__futex_word.h b/libc/include/llvm-libc-types/__futex_word.h
index 302984a8867dd..a5b6e6c5b18a4 100644
--- a/libc/include/llvm-libc-types/__futex_word.h
+++ b/libc/include/llvm-libc-types/__futex_word.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES___FUTEX_WORD_H
 #define LLVM_LIBC_TYPES___FUTEX_WORD_H
 
-#include "__llvm-libc-common.h"
+#include "../__llvm-libc-common.h"
 
 typedef struct {
   // Futex word should be aligned appropriately to allow target atomic

diff  --git a/libc/include/sys/prctl.h.def b/libc/include/sys/prctl.h.def
index 08648c9f47922..29cc2963f7bea 100644
--- a/libc/include/sys/prctl.h.def
+++ b/libc/include/sys/prctl.h.def
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SYS_PRCTL_H
 #define LLVM_LIBC_SYS_PRCTL_H
 
-#include "__llvm-libc-common.h"
+#include "../__llvm-libc-common.h"
 
 // Process control is highly platform specific, so the platform usually defines
 // the macros itself.


        


More information about the libc-commits mailing list