X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=oslib-posix.c;h=3a18e865f399e4e454a03527b471fd91a1f9b252;hb=e0e8384dd471376c3f815c3070f161480a28cc90;hp=7bc5f7cf0951d047125c2498f812da1c5650529a;hpb=4a493c6fac4db5d9094906a1e9b6d19c1dfff1ed;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) {