X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=oslib-posix.c;h=3a18e865f399e4e454a03527b471fd91a1f9b252;hb=5a82362ad0bf06bba3377d63ca0ecd05fb74f322;hp=7bc5f7cf0951d047125c2498f812da1c5650529a;hpb=38671423466875ecd848710cc1d7019448a6b145;p=qemu.git diff --git a/oslib-posix.c b/oslib-posix.c index 7bc5f7cf0..3a18e865f 100644 --- a/oslib-posix.c +++ b/oslib-posix.c @@ -26,11 +26,27 @@ * 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 +#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) {