|
|
383d26 |
From 39f21fd9c1bcd7f085193e5310efa79c3c759acd Mon Sep 17 00:00:00 2001
|
|
|
383d26 |
From: "plai@redhat.com" <plai@redhat.com>
|
|
|
383d26 |
Date: Thu, 21 Jun 2018 18:54:39 +0200
|
|
|
383d26 |
Subject: [PATCH 30/57] osdep: add wait.h compat macros
|
|
|
383d26 |
|
|
|
383d26 |
RH-Author: plai@redhat.com
|
|
|
383d26 |
Message-id: <1529607285-9942-5-git-send-email-plai@redhat.com>
|
|
|
383d26 |
Patchwork-id: 80938
|
|
|
383d26 |
O-Subject: [RHEL7.6 PATCH BZ 1526645 04/10] osdep: add wait.h compat macros
|
|
|
383d26 |
Bugzilla: 1526645
|
|
|
383d26 |
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
383d26 |
RH-Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
|
|
|
383d26 |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
383d26 |
|
|
|
383d26 |
From: "Michael S. Tsirkin" <mst@redhat.com>
|
|
|
383d26 |
|
|
|
383d26 |
Man page for WCOREDUMP says:
|
|
|
383d26 |
|
|
|
383d26 |
WCOREDUMP(wstatus) returns true if the child produced a core dump.
|
|
|
383d26 |
This macro should be employed only if WIFSIGNALED returned true.
|
|
|
383d26 |
|
|
|
383d26 |
This macro is not specified in POSIX.1-2001 and is not
|
|
|
383d26 |
available on some UNIX implementations (e.g., AIX, SunOS). Therefore,
|
|
|
383d26 |
enclose its use inside #ifdef WCOREDUMP ... #endif.
|
|
|
383d26 |
|
|
|
383d26 |
Let's do exactly this.
|
|
|
383d26 |
|
|
|
383d26 |
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
383d26 |
(cherry picked from commit 28012e190e6897cfc2a98364240909d08e90ffc0)
|
|
|
383d26 |
Signed-off-by: Paul Lai <plai@redhat.com>
|
|
|
383d26 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
383d26 |
---
|
|
|
383d26 |
include/qemu/osdep.h | 10 ++++++++++
|
|
|
383d26 |
1 file changed, 10 insertions(+)
|
|
|
383d26 |
|
|
|
383d26 |
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
|
|
|
383d26 |
index 4165806..afc28e5 100644
|
|
|
383d26 |
--- a/include/qemu/osdep.h
|
|
|
383d26 |
+++ b/include/qemu/osdep.h
|
|
|
383d26 |
@@ -108,6 +108,16 @@ extern int daemon(int, int);
|
|
|
383d26 |
#include "qemu/typedefs.h"
|
|
|
383d26 |
|
|
|
383d26 |
/*
|
|
|
383d26 |
+ * According to waitpid man page:
|
|
|
383d26 |
+ * WCOREDUMP
|
|
|
383d26 |
+ * This macro is not specified in POSIX.1-2001 and is not
|
|
|
383d26 |
+ * available on some UNIX implementations (e.g., AIX, SunOS).
|
|
|
383d26 |
+ * Therefore, enclose its use inside #ifdef WCOREDUMP ... #endif.
|
|
|
383d26 |
+ */
|
|
|
383d26 |
+#ifndef WCOREDUMP
|
|
|
383d26 |
+#define WCOREDUMP(status) 0
|
|
|
383d26 |
+#endif
|
|
|
383d26 |
+/*
|
|
|
383d26 |
* We have a lot of unaudited code that may fail in strange ways, or
|
|
|
383d26 |
* even be a security risk during migration, if you disable assertions
|
|
|
383d26 |
* at compile-time. You may comment out these safety checks if you
|
|
|
383d26 |
--
|
|
|
383d26 |
1.8.3.1
|
|
|
383d26 |
|