Skip to contentSkip to conversation

minios: fix x86_32 compilation

PATCH New Samuel Thibault 1 participant 1 message Jan 22, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 minios: fix x86_32 compilation

Fix x86_32 compilation

---
(That is not needed in 3.2)

extras/mini-os/include/fs.h +1 -0
diff -r b4e8d0bb7901 extras/mini-os/include/fs.h
@@ -3,6 +3,7 @@
 
 #include <xen/io/fsif.h>
 #include <semaphore.h>
+#include <types.h>
 
 struct fs_import 
 {
extras/mini-os/include/types.h +1 -1
diff -r b4e8d0bb7901 extras/mini-os/include/types.h
@@ -19,6 +19,7 @@
 
 #ifndef _TYPES_H_
 #define _TYPES_H_
+#include <stddef.h>
 
 typedef signed char         s8;
 typedef unsigned char       u8;
@@ -78,5 +79,4 @@ typedef s64 int64_t;
 #define UINT_MAX            (~0U)
 
 typedef long ssize_t;
-typedef unsigned long size_t;
 #endif /* _TYPES_H_ */
extras/mini-os/include/x86/arch_sched.h +1 -1
diff -r b4e8d0bb7901 extras/mini-os/include/x86/arch_sched.h
@@ -12,7 +12,7 @@ static inline struct thread* get_current
 #else
     register unsigned long sp asm("rsp");
 #endif 
-    current = (void *)(sp & ~(STACK_SIZE-1));
+    current = (void *)(unsigned long)(sp & ~(STACK_SIZE-1));
     return *current;
 }
 
extras/mini-os/kernel.c +1 -1
diff -r b4e8d0bb7901 extras/mini-os/kernel.c
@@ -89,7 +89,7 @@ static void netfront_thread(void *p)
     init_netfront(NULL, NULL, NULL);
 }
 
-#define RAND_MIX 2654435769
+#define RAND_MIX 2654435769U
 
 /* Should be random enough for this use */
 static int rand(void)