Skip to contentSkip to conversation

UML - Allow vsyscall code to build on 2.4

PATCH New Jeff Dike 1 participant 1 message Dec 3, 2004 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 1/1 UML - Allow vsyscall code to build on 2.4

From: Bodo Stroesser <[email protected]>

This patch fixes compilation on 2.4 hosts by not relying on macros from 2.6 host kernel headers in one userspace file. It's about AT_SYSINFO_* macros.

arch/um/include/elf_user.h new file +19 -0
diff -puN /dev/null arch/um/include/elf_user.h
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2004 Fujitsu Siemens Computers GmbH
+ * Author: Bodo Stroesser <[email protected]>
+ * Licensed under the GPL
+ */
+
+#ifndef __ELF_USER_H__
+#define __ELF_USER_H__
+
+/* For compilation on a host that doesn't support AT_SYSINFO (Linux 2.4)  */
+
+#ifndef AT_SYSINFO
+#define AT_SYSINFO 32
+#endif
+#ifndef AT_SYSINFO_EHDR
+#define AT_SYSINFO_EHDR 33
+#endif
+
+#endif
arch/um/os-Linux/elf_aux.c renamed from arch/um/os-Linux/elf_aux.c~compile-elf_aux +1 -0
diff -puN arch/um/os-Linux/elf_aux.c~compile-elf_aux arch/um/os-Linux/elf_aux.c
@@ -10,6 +10,7 @@
 #include <elf.h>
 #include <stddef.h>
 #include "init.h"
+#include "elf_user.h"
 
 #if ELF_CLASS == ELFCLASS32
 typedef Elf32_auxv_t elf_auxv_t;

_