Make xen kernel build on NetBSD
PATCH 1/1 Make xen kernel build on NetBSD
Hi!
NetBSD is able to build xen itself for a long time, but it's time to make the patches go upstream.
The attached patch makes the xen-kernel itself buildable on NetBSD.
The changes in xen/tools/symbol.c fixes this warning:
warning: array subscript has type 'char'
and the #include <stdint.h> is needed to not break the build on Linux.
The change in xen/arch/x86/shutdown.c fixes this:
error: parameter name omitted
Christoph
Signature · 12 lines
AMD Saxony, Dresden Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Geschäftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplementär: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Geschäftsführer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
config/NetBSD.mk new file +1 -0
@@ -0,0 +1,1 @@ +include $(XEN_ROOT)/config/StdGNU.mk
xen/arch/x86/shutdown.c +1 -1
@@ -197,7 +197,7 @@ static void machine_real_restart(const u#endif -void machine_restart (char * __unused) +void machine_restart (char *cmd) {int i;
xen/tools/symbols.c +3 -2
@@ -29,6 +29,7 @@#include <stdio.h> #include <stdlib.h> #include <string.h> +#include <stdint.h> #include <ctype.h> #define KSYM_NAME_LEN 127
@@ -103,7 +104,7 @@ static int read_symbol(FILE *in, struct _sextratext = s->addr; else if (strcmp(sym, "_eextratext") == 0) _eextratext = s->addr; - else if (toupper(stype) == 'A') + else if (toupper((uint8_t)stype) == 'A') {/* Keep these useful absolute symbols */ if (strcmp(sym, "__kernel_syscall_via_break") &&
@@ -113,7 +114,7 @@ static int read_symbol(FILE *in, structreturn -1 ; } -else if (toupper (stype) =='U' || +else if (toupper ((uint8_t )stype) =='U' ||is_arm_mapping_symbol (sym))return -1 ;/* exclude also MIPS ELF local symbols ($L123 instead of .L123) */
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel