]> git.proxmox.com Git - qemu.git/blobdiff - oslib-posix.c
slirp: Strictly associate DHCP/BOOTP and TFTP with virtual host
[qemu.git] / oslib-posix.c
index 7bc5f7cf0951d047125c2498f812da1c5650529a..3a18e865f399e4e454a03527b471fd91a1f9b252 100644 (file)
  * THE SOFTWARE.
  */
 
+/* The following block of code temporarily renames the daemon() function so the
+   compiler does not see the warning associated with it in stdlib.h on OSX */
+#ifdef __APPLE__
+#define daemon qemu_fake_daemon_function
+#include <stdlib.h>
+#undef daemon
+extern int daemon(int, int);
+#endif
+
 #include "config-host.h"
 #include "sysemu.h"
 #include "trace.h"
 #include "qemu_socket.h"
 
+
+
+int qemu_daemon(int nochdir, int noclose)
+{
+    return daemon(nochdir, noclose);
+}
+
 void *qemu_oom_check(void *ptr)
 {
     if (ptr == NULL) {