[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 07/31] osdep: add wait.h compat macros
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 07/31] osdep: add wait.h compat macros |
Date: |
Fri, 1 Jun 2018 19:26:54 +0300 |
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 <address@hidden>
---
include/qemu/osdep.h | 10 ++++++++++
1 file changed, 10 insertions(+)
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
@@ -107,6 +107,16 @@ extern int daemon(int, int);
#include "glib-compat.h"
#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
--
MST
- [Qemu-devel] [PULL 00/31] acpi, vhost, misc: fixes, features, Michael S. Tsirkin, 2018/06/01
- [Qemu-devel] [PULL 01/31] vhost: allow backends to filter memory sections, Michael S. Tsirkin, 2018/06/01
- [Qemu-devel] [PULL 02/31] vhost-user: allow slave to send fds via slave channel, Michael S. Tsirkin, 2018/06/01
- [Qemu-devel] [PULL 04/31] vhost-user: support registering external host notifiers, Michael S. Tsirkin, 2018/06/01
- [Qemu-devel] [PULL 03/31] vhost-user: introduce shared vhost-user state, Michael S. Tsirkin, 2018/06/01
- [Qemu-devel] [PULL 05/31] libvhost-user: support host notifier, Michael S. Tsirkin, 2018/06/01
- [Qemu-devel] [PULL 10/31] crypto: use local path for local headers, Michael S. Tsirkin, 2018/06/01
- [Qemu-devel] [PULL 07/31] osdep: add wait.h compat macros,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 08/31] libqtest: fail if child coredumps, Michael S. Tsirkin, 2018/06/01
- [Qemu-devel] [PULL 06/31] vhost-user-bridge: support host notifier, Michael S. Tsirkin, 2018/06/01
- [Qemu-devel] [PULL 11/31] hppa: use local path for local headers, Michael S. Tsirkin, 2018/06/01
- [Qemu-devel] [PULL 12/31] migration: drop an unused include, Michael S. Tsirkin, 2018/06/01
- [Qemu-devel] [PULL 09/31] block: use local path for local headers, Michael S. Tsirkin, 2018/06/01
- [Qemu-devel] [PULL 13/31] trace: use local path for local headers, Michael S. Tsirkin, 2018/06/01
- [Qemu-devel] [PULL 14/31] display: use local path for local headers, Michael S. Tsirkin, 2018/06/01
- [Qemu-devel] [PULL 17/31] e1000e: use local path for local headers, Michael S. Tsirkin, 2018/06/01
- [Qemu-devel] [PULL 20/31] vhost-scsi: drop an unused include, Michael S. Tsirkin, 2018/06/01
- [Qemu-devel] [PULL 16/31] ioapic: fix up includes, Michael S. Tsirkin, 2018/06/01