1*4882a593SmuzhiyunFrom 91123bb5201156e3d3adbe24305488f5eea2c8d7 Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: Christian Persch <chpe@src.gnome.org> 3*4882a593SmuzhiyunDate: Mon, 27 Sep 2021 22:46:47 +0200 4*4882a593SmuzhiyunSubject: [PATCH] build: Fix build with kernel headers from linux < 4.13 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunWe already support running with a kernel that doesn't support this 7*4882a593Smuzhiyunioctl, so let's also support building with one. Add the missing 8*4882a593Smuzhiyunioctl definition to missing.hh. 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunFixes: https://gitlab.gnome.org/GNOME/vte/-/issues/2514 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun[Retrieved from: 13*4882a593Smuzhiyunhttps://gitlab.gnome.org/GNOME/vte/-/commit/91123bb5201156e3d3adbe24305488f5eea2c8d7] 14*4882a593SmuzhiyunSigned-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 15*4882a593Smuzhiyun--- 16*4882a593Smuzhiyun src/missing.hh | 12 ++++++++++++ 17*4882a593Smuzhiyun 1 file changed, 12 insertions(+) 18*4882a593Smuzhiyun 19*4882a593Smuzhiyundiff --git a/src/missing.hh b/src/missing.hh 20*4882a593Smuzhiyunindex e5a58727..7902e41e 100644 21*4882a593Smuzhiyun--- a/src/missing.hh 22*4882a593Smuzhiyun+++ b/src/missing.hh 23*4882a593Smuzhiyun@@ -23,11 +23,14 @@ 24*4882a593Smuzhiyun #include <fcntl.h> 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun #ifdef __linux__ 27*4882a593Smuzhiyun+ 28*4882a593Smuzhiyun+#include <sys/ioctl.h> 29*4882a593Smuzhiyun #include <sys/syscall.h> 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun #if defined(__mips__) || defined(__mips64__) 32*4882a593Smuzhiyun #include <asm/sgidefs.h> 33*4882a593Smuzhiyun #endif 34*4882a593Smuzhiyun+ 35*4882a593Smuzhiyun #endif 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun /* NSIG isn't in POSIX, so if it doesn't exist use this here. See bug #759196 */ 38*4882a593Smuzhiyun@@ -128,4 +131,13 @@ char* strchrnul(char const* s, 39*4882a593Smuzhiyun #define CLOSE_RANGE_CLOEXEC (1u << 2) 40*4882a593Smuzhiyun #endif 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun+#if !defined(TIOCGPTPEER) 43*4882a593Smuzhiyun+/* See linux commit 54ebbfb1603415d9953c150535850d30609ef077 */ 44*4882a593Smuzhiyun+#if defined(__sparc__) 45*4882a593Smuzhiyun+#define TIOCGPTPEER _IOR('t', 137, int) 46*4882a593Smuzhiyun+#else 47*4882a593Smuzhiyun+#define TIOCGPTPEER _IOR('T', 0x41, int) 48*4882a593Smuzhiyun+#endif 49*4882a593Smuzhiyun+#endif /* !TIOCGPTPEER */ 50*4882a593Smuzhiyun+ 51*4882a593Smuzhiyun #endif /* __linux__ */ 52*4882a593Smuzhiyun-- 53*4882a593SmuzhiyunGitLab 54*4882a593Smuzhiyun 55