summarylogtreecommitdiffstats
path: root/79_all-sanitizer_common-Remove-reference-to-obsolete-termio.patch
blob: a846d101d03eaf75ad91248fbdc0b22b2d0680cf (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
From a8bb9c3f8a6ac155250cdcc3edc55ee24561670f Mon Sep 17 00:00:00 2001
Message-ID: <a8bb9c3f8a6ac155250cdcc3edc55ee24561670f.1753477523.git.sam@gentoo.org>
In-Reply-To: <6afd8bac7f8e7b95984b5a1be4bb5ec71c33f44f.1753477523.git.sam@gentoo.org>
References: <6afd8bac7f8e7b95984b5a1be4bb5ec71c33f44f.1753477523.git.sam@gentoo.org>
From: Sam James <sam@gentoo.org>
Date: Fri, 25 Jul 2025 19:45:18 +0100
Subject: [PATCH 2/2] [sanitizer_common] Remove reference to obsolete termio
 ioctls (#138822)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Cherry picked from LLVM commit c99b1bcd505064f2e086e6b1034ce0b0c91ea5b9.

The termio ioctls are no longer used after commit 59978b21ad9c
("[sanitizer_common] Remove interceptors for deprecated struct termio
(#137403)"), remove them.  Fixes this build error:

../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:765:27: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’
  765 |   unsigned IOCTL_TCGETA = TCGETA;
      |                           ^~~~~~
../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:769:27: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’
  769 |   unsigned IOCTL_TCSETA = TCSETA;
      |                           ^~~~~~
../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:770:28: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’
  770 |   unsigned IOCTL_TCSETAF = TCSETAF;
      |                            ^~~~~~~
../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:771:28: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’
  771 |   unsigned IOCTL_TCSETAW = TCSETAW;
      |                            ^~~~~~~

(cherry picked from commit 50cff2194bcb8321414437169d443bf48695972c)
---
 .../sanitizer_common/sanitizer_platform_limits_posix.cpp      | 4 ----
 .../sanitizer_common/sanitizer_platform_limits_posix.h        | 4 ----
 2 files changed, 8 deletions(-)

Adapted from gcc12 to gcc-6.5.0 by Chris Severance aur.severach aATt spamgourmet dott com

diff -pNaru3 a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc	2025-10-24 19:38:05.048668429 -0400
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc	2025-10-24 19:38:31.305580527 -0400
@@ -688,13 +688,9 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
   unsigned IOCTL_SOUND_PCM_WRITE_FILTER = SOUND_PCM_WRITE_FILTER;
 #endif // SOUND_VERSION
   unsigned IOCTL_TCFLSH = TCFLSH;
-  unsigned IOCTL_TCGETA = TCGETA;
   unsigned IOCTL_TCGETS = TCGETS;
   unsigned IOCTL_TCSBRK = TCSBRK;
   unsigned IOCTL_TCSBRKP = TCSBRKP;
-  unsigned IOCTL_TCSETA = TCSETA;
-  unsigned IOCTL_TCSETAF = TCSETAF;
-  unsigned IOCTL_TCSETAW = TCSETAW;
   unsigned IOCTL_TCSETS = TCSETS;
   unsigned IOCTL_TCSETSF = TCSETSF;
   unsigned IOCTL_TCSETSW = TCSETSW;
diff -pNaru3 a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h	2025-10-24 19:38:05.048668429 -0400
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h	2025-10-24 19:38:31.305580527 -0400
@@ -1178,13 +1178,9 @@ struct __sanitizer_cookie_io_functions_t
   extern unsigned IOCTL_SNDCTL_COPR_WCODE;
   extern unsigned IOCTL_SNDCTL_COPR_WDATA;
   extern unsigned IOCTL_TCFLSH;
-  extern unsigned IOCTL_TCGETA;
   extern unsigned IOCTL_TCGETS;
   extern unsigned IOCTL_TCSBRK;
   extern unsigned IOCTL_TCSBRKP;
-  extern unsigned IOCTL_TCSETA;
-  extern unsigned IOCTL_TCSETAF;
-  extern unsigned IOCTL_TCSETAW;
   extern unsigned IOCTL_TCSETS;
   extern unsigned IOCTL_TCSETSF;
   extern unsigned IOCTL_TCSETSW;