mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
oslib-posix.c: Move workaround for OSX daemon() deprecation to osdep.h
The right place for "work around issues with system headers" code is osdep.h. Move the workaround for OSX's stdlib.h emitting a deprecation warning for daemon() to that header. This also fixes a problem where running clean-includes on oslib-posix.c would erroneously remove the #include <stdlib.h> from it, breaking the workaround. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
c964b66022
commit
d5db2ec177
2 changed files with 11 additions and 9 deletions
|
@ -26,15 +26,6 @@
|
|||
* 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
|
||||
|
||||
#if defined(__linux__) && (defined(__x86_64__) || defined(__arm__))
|
||||
/* Use 2 MiB alignment so transparent hugepages can be used by KVM.
|
||||
Valgrind does not support alignments larger than 1 MiB,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue