Skip to contentSkip to conversation

OSX in_addr compile fix

PATCH New Tim Douglas 1 participant 1 message Aug 26, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OSX in_addr compile fix

Mac OS X needs to include netinet/in.h for in_addr, used in the new port redirection patch. Attached is a patch that fixes this.

-Tim

Index: vl.c
===================================================================
RCS file: /cvsroot/qemu/qemu/vl.c,v
retrieving revision 1.95

vl.c +5 -0
diff -u -r1.95 vl.c
@@ -64,6 +64,11 @@
 #define memalign(align, size) malloc(size)
 #endif
 
+/* OSX needs another header for in_addr */
+#ifdef __APPLE__
+#include <netinet/in.h>
+#endif
+
 #ifdef CONFIG_SDL
 #ifdef __APPLE__
 #include <SDL/SDL.h>