]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libsanitizer: Fix up build against latest kernel headers
authorJakub Jelinek <jakub@redhat.com>
Wed, 29 Apr 2026 09:14:03 +0000 (11:14 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 29 Apr 2026 09:14:03 +0000 (11:14 +0200)
The Linux kernel recently removed the linux/scc.h header, so gcc (both
16.1-rc2 and trunk) fails to build e.g. on Fedora rawhide now.

The following patch cherry picks a recent upstream fix for this, the macros
defined in that header haven't been really used since 2013-ish.

2026-04-29  Jakub Jelinek  <jakub@redhat.com>

* sanitizer_common/sanitizer_platform_limits_posix.cpp: Cherry picked
from LLVM commit 3dc4fd6dd41100f051a63642f449b16324389c96.

Reviewed-by: Richard Biener <rguenth@suse.de>
libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp

index 5872e3396f053cf09cd464e9eaec6d936f9ca6c3..47eb1dc32677210403860a12b00456cb914d9a14 100644 (file)
@@ -152,16 +152,15 @@ typedef struct user_fpregs elf_fpregset_t;
 #if defined(__mips64)
 # include <sys/procfs.h>
 #endif
-#include <sys/user.h>
-#include <linux/if_eql.h>
-#include <linux/if_plip.h>
-#include <linux/lp.h>
-#include <linux/mroute.h>
-#include <linux/mroute6.h>
-#include <linux/scc.h>
-#include <linux/serial.h>
-#include <sys/msg.h>
-#include <sys/ipc.h>
+#      include <linux/if_eql.h>
+#      include <linux/if_plip.h>
+#      include <linux/lp.h>
+#      include <linux/mroute.h>
+#      include <linux/mroute6.h>
+#      include <linux/serial.h>
+#      include <sys/ipc.h>
+#      include <sys/msg.h>
+#      include <sys/user.h>
 #endif  // SANITIZER_ANDROID
 
 #include <link.h>
@@ -534,8 +533,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
   unsigned struct_kbsentry_sz = sizeof(struct kbsentry);
   unsigned struct_mtconfiginfo_sz = sizeof(struct mtconfiginfo);
   unsigned struct_nr_parms_struct_sz = sizeof(struct nr_parms_struct);
-  unsigned struct_scc_modem_sz = sizeof(struct scc_modem);
-  unsigned struct_scc_stat_sz = sizeof(struct scc_stat);
   unsigned struct_serial_multiport_struct_sz
       = sizeof(struct serial_multiport_struct);
   unsigned struct_serial_struct_sz = sizeof(struct serial_struct);