dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

Blame 0021-virtiofsd-Fix-common-header-and-define-for-QEMU-buil.patch

1d442b
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
1d442b
Date: Mon, 27 Jan 2020 19:00:50 +0000
1d442b
Subject: [PATCH] virtiofsd: Fix common header and define for QEMU builds
1d442b
MIME-Version: 1.0
1d442b
Content-Type: text/plain; charset=UTF-8
1d442b
Content-Transfer-Encoding: 8bit
1d442b
1d442b
All of the fuse files include config.h and define GNU_SOURCE
1d442b
where we don't have either under our build - remove them.
1d442b
Fixup path to the kernel's fuse.h in the QEMUs world.
1d442b
1d442b
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
1d442b
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
1d442b
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
1d442b
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
1d442b
(cherry picked from commit 09863ebc7e32a107235b3c815ad54d26cc64f07a)
1d442b
---
1d442b
 tools/virtiofsd/buffer.c         | 4 +---
1d442b
 tools/virtiofsd/fuse_i.h         | 3 +++
1d442b
 tools/virtiofsd/fuse_log.c       | 1 +
1d442b
 tools/virtiofsd/fuse_lowlevel.c  | 6 ++----
1d442b
 tools/virtiofsd/fuse_opt.c       | 2 +-
1d442b
 tools/virtiofsd/fuse_signals.c   | 2 +-
1d442b
 tools/virtiofsd/helper.c         | 1 +
1d442b
 tools/virtiofsd/passthrough_ll.c | 8 ++------
1d442b
 8 files changed, 12 insertions(+), 15 deletions(-)
1d442b
1d442b
diff --git a/tools/virtiofsd/buffer.c b/tools/virtiofsd/buffer.c
1d442b
index 4d507f3302..772efa922d 100644
1d442b
--- a/tools/virtiofsd/buffer.c
1d442b
+++ b/tools/virtiofsd/buffer.c
1d442b
@@ -9,9 +9,7 @@
1d442b
  * See the file COPYING.LIB
1d442b
  */
1d442b
 
1d442b
-#define _GNU_SOURCE
1d442b
-
1d442b
-#include "config.h"
1d442b
+#include "qemu/osdep.h"
1d442b
 #include "fuse_i.h"
1d442b
 #include "fuse_lowlevel.h"
1d442b
 #include <assert.h>
1d442b
diff --git a/tools/virtiofsd/fuse_i.h b/tools/virtiofsd/fuse_i.h
1d442b
index e63cb58388..bae06992e0 100644
1d442b
--- a/tools/virtiofsd/fuse_i.h
1d442b
+++ b/tools/virtiofsd/fuse_i.h
1d442b
@@ -6,6 +6,9 @@
1d442b
  * See the file COPYING.LIB
1d442b
  */
1d442b
 
1d442b
+#define FUSE_USE_VERSION 31
1d442b
+
1d442b
+
1d442b
 #include "fuse.h"
1d442b
 #include "fuse_lowlevel.h"
1d442b
 
1d442b
diff --git a/tools/virtiofsd/fuse_log.c b/tools/virtiofsd/fuse_log.c
1d442b
index 11345f9ec8..c301ff6da1 100644
1d442b
--- a/tools/virtiofsd/fuse_log.c
1d442b
+++ b/tools/virtiofsd/fuse_log.c
1d442b
@@ -8,6 +8,7 @@
1d442b
  * See the file COPYING.LIB
1d442b
  */
1d442b
 
1d442b
+#include "qemu/osdep.h"
1d442b
 #include "fuse_log.h"
1d442b
 
1d442b
 #include <stdarg.h>
1d442b
diff --git a/tools/virtiofsd/fuse_lowlevel.c b/tools/virtiofsd/fuse_lowlevel.c
1d442b
index 3da80de233..07fb8a6095 100644
1d442b
--- a/tools/virtiofsd/fuse_lowlevel.c
1d442b
+++ b/tools/virtiofsd/fuse_lowlevel.c
1d442b
@@ -9,11 +9,9 @@
1d442b
  * See the file COPYING.LIB
1d442b
  */
1d442b
 
1d442b
-#define _GNU_SOURCE
1d442b
-
1d442b
-#include "config.h"
1d442b
+#include "qemu/osdep.h"
1d442b
 #include "fuse_i.h"
1d442b
-#include "fuse_kernel.h"
1d442b
+#include "standard-headers/linux/fuse.h"
1d442b
 #include "fuse_misc.h"
1d442b
 #include "fuse_opt.h"
1d442b
 
1d442b
diff --git a/tools/virtiofsd/fuse_opt.c b/tools/virtiofsd/fuse_opt.c
1d442b
index edd36f4a3b..28922361a2 100644
1d442b
--- a/tools/virtiofsd/fuse_opt.c
1d442b
+++ b/tools/virtiofsd/fuse_opt.c
1d442b
@@ -9,8 +9,8 @@
1d442b
  * See the file COPYING.LIB
1d442b
  */
1d442b
 
1d442b
+#include "qemu/osdep.h"
1d442b
 #include "fuse_opt.h"
1d442b
-#include "config.h"
1d442b
 #include "fuse_i.h"
1d442b
 #include "fuse_misc.h"
1d442b
 
1d442b
diff --git a/tools/virtiofsd/fuse_signals.c b/tools/virtiofsd/fuse_signals.c
1d442b
index 19d6791cb9..dc7c8ac025 100644
1d442b
--- a/tools/virtiofsd/fuse_signals.c
1d442b
+++ b/tools/virtiofsd/fuse_signals.c
1d442b
@@ -8,7 +8,7 @@
1d442b
  * See the file COPYING.LIB
1d442b
  */
1d442b
 
1d442b
-#include "config.h"
1d442b
+#include "qemu/osdep.h"
1d442b
 #include "fuse_i.h"
1d442b
 #include "fuse_lowlevel.h"
1d442b
 
1d442b
diff --git a/tools/virtiofsd/helper.c b/tools/virtiofsd/helper.c
1d442b
index d9227d7367..9333691525 100644
1d442b
--- a/tools/virtiofsd/helper.c
1d442b
+++ b/tools/virtiofsd/helper.c
1d442b
@@ -10,6 +10,7 @@
1d442b
  * See the file COPYING.LIB.
1d442b
  */
1d442b
 
1d442b
+#include "qemu/osdep.h"
1d442b
 #include "fuse_i.h"
1d442b
 #include "fuse_lowlevel.h"
1d442b
 #include "fuse_misc.h"
1d442b
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
1d442b
index 126a56ccbd..322a889cdf 100644
1d442b
--- a/tools/virtiofsd/passthrough_ll.c
1d442b
+++ b/tools/virtiofsd/passthrough_ll.c
1d442b
@@ -35,15 +35,11 @@
1d442b
  * \include passthrough_ll.c
1d442b
  */
1d442b
 
1d442b
-#define _GNU_SOURCE
1d442b
-#define FUSE_USE_VERSION 31
1d442b
-
1d442b
-#include "config.h"
1d442b
-
1d442b
+#include "qemu/osdep.h"
1d442b
+#include "fuse_lowlevel.h"
1d442b
 #include <assert.h>
1d442b
 #include <dirent.h>
1d442b
 #include <errno.h>
1d442b
-#include <fuse_lowlevel.h>
1d442b
 #include <inttypes.h>
1d442b
 #include <limits.h>
1d442b
 #include <pthread.h>