Skip to contentSkip to conversation

um: Compile with modern headers

PATCH In review Alessio Balsini 2 participants 2 messages Jul 3, 2019 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 um: Compile with modern headers

From: "Jason A. Donenfeld" <[email protected]>

commit 530ba6c7cb3c22435a4d26de47037bb6f86a5329 upstream.

Recent libcs have gotten a bit more strict, so we actually need to include the right headers and use the right types. This enables UML to compile again.

---
 arch/um/os-Linux/file.c   | 1 +
 arch/um/os-Linux/signal.c | 2 ++
 arch/x86/um/stub_segv.c   | 1 +
 3 files changed, 4 insertions(+)
arch/um/os-Linux/file.c +1 -0
index 26e0164895e4..6e6f6d28d54b 100644
@@ -12,6 +12,7 @@
 #include <sys/mount.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
+#include <sys/sysmacros.h>
 #include <sys/un.h>
 #include <sys/types.h>
 #include <os.h>
arch/um/os-Linux/signal.c +2 -0
index 56648f4f8b41..5da50451d372 100644
@@ -14,7 +14,9 @@
 #include <as-layout.h>
 #include <kern_util.h>
 #include <os.h>
+#include <sys/ucontext.h>
 #include <sysdep/mcontext.h>
+#include <um_malloc.h>
 
 void (*sig_info[NSIG])(int, struct siginfo *, struct uml_pt_regs *) = {
 	[SIGTRAP]	= relay_signal,
arch/x86/um/stub_segv.c +1 -0
index fd6825537b97..27361cbb7ca9 100644
@@ -6,6 +6,7 @@
 #include <sysdep/stub.h>
 #include <sysdep/faultinfo.h>
 #include <sysdep/mcontext.h>
+#include <sys/ucontext.h>
 
 void __attribute__ ((__section__ (".__syscall_stub")))
 stub_segv_handler(int sig, siginfo_t *info, void *p)
Signature · 1 line
2.22.0.410.gd8fdbe21b5-goog
maintainer
#1 lore raw
Quoted 12 lines · Alessio Balsini

From: "Jason A. Donenfeld" <[email protected]>

commit 530ba6c7cb3c22435a4d26de47037bb6f86a5329 upstream.

Recent libcs have gotten a bit more strict, so we actually need to include the right headers and use the right types. This enables UML to compile again.

Quoted 5 lines
---
 arch/um/os-Linux/file.c   | 1 +
 arch/um/os-Linux/signal.c | 2 ++
 arch/x86/um/stub_segv.c   | 1 +
 3 files changed, 4 insertions(+)

Thanks for this, now applied.

greg k-h