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

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