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