yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
ddf19c
From 6d41fc549198e140f38fddcb02975098df040ae1 Mon Sep 17 00:00:00 2001
ddf19c
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
ddf19c
Date: Mon, 27 Jan 2020 19:00:50 +0100
ddf19c
Subject: [PATCH 019/116] virtiofsd: Fix common header and define for QEMU
ddf19c
 builds
ddf19c
MIME-Version: 1.0
ddf19c
Content-Type: text/plain; charset=UTF-8
ddf19c
Content-Transfer-Encoding: 8bit
ddf19c
ddf19c
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
ddf19c
Message-id: <20200127190227.40942-16-dgilbert@redhat.com>
ddf19c
Patchwork-id: 93470
ddf19c
O-Subject: [RHEL-AV-8.2 qemu-kvm PATCH 015/112] virtiofsd: Fix common header and define for QEMU builds
ddf19c
Bugzilla: 1694164
ddf19c
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
ddf19c
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
ddf19c
RH-Acked-by: Sergio Lopez Pascual <slp@redhat.com>
ddf19c
ddf19c
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
ddf19c
ddf19c
All of the fuse files include config.h and define GNU_SOURCE
ddf19c
where we don't have either under our build - remove them.
ddf19c
Fixup path to the kernel's fuse.h in the QEMUs world.
ddf19c
ddf19c
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
ddf19c
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
ddf19c
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
ddf19c
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
ddf19c
(cherry picked from commit 09863ebc7e32a107235b3c815ad54d26cc64f07a)
ddf19c
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
ddf19c
---
ddf19c
 tools/virtiofsd/buffer.c         | 4 +---
ddf19c
 tools/virtiofsd/fuse_i.h         | 3 +++
ddf19c
 tools/virtiofsd/fuse_log.c       | 1 +
ddf19c
 tools/virtiofsd/fuse_lowlevel.c  | 6 ++----
ddf19c
 tools/virtiofsd/fuse_opt.c       | 2 +-
ddf19c
 tools/virtiofsd/fuse_signals.c   | 2 +-
ddf19c
 tools/virtiofsd/helper.c         | 1 +
ddf19c
 tools/virtiofsd/passthrough_ll.c | 8 ++------
ddf19c
 8 files changed, 12 insertions(+), 15 deletions(-)
ddf19c
ddf19c
diff --git a/tools/virtiofsd/buffer.c b/tools/virtiofsd/buffer.c
ddf19c
index 4d507f3..772efa9 100644
ddf19c
--- a/tools/virtiofsd/buffer.c
ddf19c
+++ b/tools/virtiofsd/buffer.c
ddf19c
@@ -9,9 +9,7 @@
ddf19c
  * See the file COPYING.LIB
ddf19c
  */
ddf19c
 
ddf19c
-#define _GNU_SOURCE
ddf19c
-
ddf19c
-#include "config.h"
ddf19c
+#include "qemu/osdep.h"
ddf19c
 #include "fuse_i.h"
ddf19c
 #include "fuse_lowlevel.h"
ddf19c
 #include <assert.h>
ddf19c
diff --git a/tools/virtiofsd/fuse_i.h b/tools/virtiofsd/fuse_i.h
ddf19c
index e63cb58..bae0699 100644
ddf19c
--- a/tools/virtiofsd/fuse_i.h
ddf19c
+++ b/tools/virtiofsd/fuse_i.h
ddf19c
@@ -6,6 +6,9 @@
ddf19c
  * See the file COPYING.LIB
ddf19c
  */
ddf19c
 
ddf19c
+#define FUSE_USE_VERSION 31
ddf19c
+
ddf19c
+
ddf19c
 #include "fuse.h"
ddf19c
 #include "fuse_lowlevel.h"
ddf19c
 
ddf19c
diff --git a/tools/virtiofsd/fuse_log.c b/tools/virtiofsd/fuse_log.c
ddf19c
index 11345f9..c301ff6 100644
ddf19c
--- a/tools/virtiofsd/fuse_log.c
ddf19c
+++ b/tools/virtiofsd/fuse_log.c
ddf19c
@@ -8,6 +8,7 @@
ddf19c
  * See the file COPYING.LIB
ddf19c
  */
ddf19c
 
ddf19c
+#include "qemu/osdep.h"
ddf19c
 #include "fuse_log.h"
ddf19c
 
ddf19c
 #include <stdarg.h>
ddf19c
diff --git a/tools/virtiofsd/fuse_lowlevel.c b/tools/virtiofsd/fuse_lowlevel.c
ddf19c
index 3da80de..07fb8a6 100644
ddf19c
--- a/tools/virtiofsd/fuse_lowlevel.c
ddf19c
+++ b/tools/virtiofsd/fuse_lowlevel.c
ddf19c
@@ -9,11 +9,9 @@
ddf19c
  * See the file COPYING.LIB
ddf19c
  */
ddf19c
 
ddf19c
-#define _GNU_SOURCE
ddf19c
-
ddf19c
-#include "config.h"
ddf19c
+#include "qemu/osdep.h"
ddf19c
 #include "fuse_i.h"
ddf19c
-#include "fuse_kernel.h"
ddf19c
+#include "standard-headers/linux/fuse.h"
ddf19c
 #include "fuse_misc.h"
ddf19c
 #include "fuse_opt.h"
ddf19c
 
ddf19c
diff --git a/tools/virtiofsd/fuse_opt.c b/tools/virtiofsd/fuse_opt.c
ddf19c
index edd36f4..2892236 100644
ddf19c
--- a/tools/virtiofsd/fuse_opt.c
ddf19c
+++ b/tools/virtiofsd/fuse_opt.c
ddf19c
@@ -9,8 +9,8 @@
ddf19c
  * See the file COPYING.LIB
ddf19c
  */
ddf19c
 
ddf19c
+#include "qemu/osdep.h"
ddf19c
 #include "fuse_opt.h"
ddf19c
-#include "config.h"
ddf19c
 #include "fuse_i.h"
ddf19c
 #include "fuse_misc.h"
ddf19c
 
ddf19c
diff --git a/tools/virtiofsd/fuse_signals.c b/tools/virtiofsd/fuse_signals.c
ddf19c
index 19d6791..dc7c8ac 100644
ddf19c
--- a/tools/virtiofsd/fuse_signals.c
ddf19c
+++ b/tools/virtiofsd/fuse_signals.c
ddf19c
@@ -8,7 +8,7 @@
ddf19c
  * See the file COPYING.LIB
ddf19c
  */
ddf19c
 
ddf19c
-#include "config.h"
ddf19c
+#include "qemu/osdep.h"
ddf19c
 #include "fuse_i.h"
ddf19c
 #include "fuse_lowlevel.h"
ddf19c
 
ddf19c
diff --git a/tools/virtiofsd/helper.c b/tools/virtiofsd/helper.c
ddf19c
index d9227d7..9333691 100644
ddf19c
--- a/tools/virtiofsd/helper.c
ddf19c
+++ b/tools/virtiofsd/helper.c
ddf19c
@@ -10,6 +10,7 @@
ddf19c
  * See the file COPYING.LIB.
ddf19c
  */
ddf19c
 
ddf19c
+#include "qemu/osdep.h"
ddf19c
 #include "fuse_i.h"
ddf19c
 #include "fuse_lowlevel.h"
ddf19c
 #include "fuse_misc.h"
ddf19c
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
ddf19c
index 126a56c..322a889 100644
ddf19c
--- a/tools/virtiofsd/passthrough_ll.c
ddf19c
+++ b/tools/virtiofsd/passthrough_ll.c
ddf19c
@@ -35,15 +35,11 @@
ddf19c
  * \include passthrough_ll.c
ddf19c
  */
ddf19c
 
ddf19c
-#define _GNU_SOURCE
ddf19c
-#define FUSE_USE_VERSION 31
ddf19c
-
ddf19c
-#include "config.h"
ddf19c
-
ddf19c
+#include "qemu/osdep.h"
ddf19c
+#include "fuse_lowlevel.h"
ddf19c
 #include <assert.h>
ddf19c
 #include <dirent.h>
ddf19c
 #include <errno.h>
ddf19c
-#include <fuse_lowlevel.h>
ddf19c
 #include <inttypes.h>
ddf19c
 #include <limits.h>
ddf19c
 #include <pthread.h>
ddf19c
-- 
ddf19c
1.8.3.1
ddf19c