aboutsummaryrefslogtreecommitdiff
path: root/emulators/qemu/files/patch-qemu_Makefiles
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/qemu/files/patch-qemu_Makefiles')
-rw-r--r--emulators/qemu/files/patch-qemu_Makefiles36
1 files changed, 36 insertions, 0 deletions
diff --git a/emulators/qemu/files/patch-qemu_Makefiles b/emulators/qemu/files/patch-qemu_Makefiles
new file mode 100644
index 000000000000..27c544f14341
--- /dev/null
+++ b/emulators/qemu/files/patch-qemu_Makefiles
@@ -0,0 +1,36 @@
+Index: qemu/Makefile
+@@ -19,6 +19,7 @@
+ CPPFLAGS += -I. -I$(SRC_PATH) -MMD -MP -MT $@
+ CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
+ CPPFLAGS += -U_FORTIFY_SOURCE
++CPPFLAGS += -DSMBD_COMMAND=\"${LOCALBASE}/sbin/smbd\" -I${LOCALBASE}/include -DPREFIX=\"${PREFIX}\"
+ LIBS=
+ ifdef CONFIG_STATIC
+ LDFLAGS += -static
+Index: qemu/Makefile.target
+@@ -54,6 +54,7 @@
+
+ CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
+ CPPFLAGS+=-U_FORTIFY_SOURCE
++CPPFLAGS+=-DSMBD_COMMAND=\"${LOCALBASE}/sbin/smbd\" -I${LOCALBASE}/include -DPREFIX=\"${PREFIX}\"
+ LIBS+=-lm
+ ifdef CONFIG_WIN32
+ LIBS+=-lwinmm -lws2_32 -liphlpapi
+Index: qemu/net.h
+@@ -99,12 +99,14 @@
+ int slirp_is_inited(void);
+ void net_client_check(void);
+
+-#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
+-#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
++#define DEFAULT_NETWORK_SCRIPT PREFIX "/etc/qemu-ifup"
++#define DEFAULT_NETWORK_DOWN_SCRIPT PREFIX "/etc/qemu-ifdown"
++#ifndef SMBD_COMMAND
+ #ifdef __sun__
+ #define SMBD_COMMAND "/usr/sfw/sbin/smbd"
+ #else
+ #define SMBD_COMMAND "/usr/sbin/smbd"
+ #endif
++#endif
+
+ #endif