diff options
author | Michael S. Tsirkin | 2018-05-24 20:09:52 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2018-05-24 20:14:11 +0200 |
commit | 28012e190e6897cfc2a98364240909d08e90ffc0 (patch) | |
tree | d4b6a3f1a160acbcc2f061805739219bc0bb248a /include/qemu/osdep.h | |
parent | vhost-user-bridge: support host notifier (diff) | |
download | qemu-28012e190e6897cfc2a98364240909d08e90ffc0.tar.gz qemu-28012e190e6897cfc2a98364240909d08e90ffc0.tar.xz qemu-28012e190e6897cfc2a98364240909d08e90ffc0.zip |
osdep: add wait.h compat macros
Man page for WCOREDUMP says:
WCOREDUMP(wstatus) returns true if the child produced a core dump.
This macro should be employed only if WIFSIGNALED returned true.
This macro is not specified in POSIX.1-2001 and is not
available on some UNIX implementations (e.g., AIX, SunOS). Therefore,
enclose its use inside #ifdef WCOREDUMP ... #endif.
Let's do exactly this.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/qemu/osdep.h')
-rw-r--r-- | include/qemu/osdep.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 41658060a7..afc28e5903 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -108,6 +108,16 @@ extern int daemon(int, int); #include "qemu/typedefs.h" /* + * According to waitpid man page: + * WCOREDUMP + * This macro is not specified in POSIX.1-2001 and is not + * available on some UNIX implementations (e.g., AIX, SunOS). + * Therefore, enclose its use inside #ifdef WCOREDUMP ... #endif. + */ +#ifndef WCOREDUMP +#define WCOREDUMP(status) 0 +#endif +/* * We have a lot of unaudited code that may fail in strange ways, or * even be a security risk during migration, if you disable assertions * at compile-time. You may comment out these safety checks if you |