Blame SOURCES/kvm-osdep-add-wait.h-compat-macros.patch

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