169 lines
4.3 KiB
Diff
169 lines
4.3 KiB
Diff
From 06e0a9d40c52736919f32578f926bf4d829e77ec Mon Sep 17 00:00:00 2001
|
|
Message-Id: <06e0a9d40c52736919f32578f926bf4d829e77ec@dist-git>
|
|
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
|
Date: Mon, 27 Jul 2020 12:36:49 +0200
|
|
Subject: [PATCH] src: assume sys/sysmacros.h always exists on Linux
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
All our supported Linux distros now have this header.
|
|
It has never existed on FreeBSD / macOS / Mingw.
|
|
|
|
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
|
|
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
(cherry picked from commit 03c532cf9711dd6ad35380455a77141ef7d492ab)
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1860421
|
|
|
|
Conflicts:
|
|
- src/util/virutil.c - context, because
|
|
db72866310d1e520efa8ed2d4589bdb5e76a1c95 (util: add API for
|
|
reading password from the console) isn't backported.
|
|
|
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
Message-Id: <ec98419d1aaa478bd3ac7a41aa9cb8b316695ef9.1595846084.git.mprivozn@redhat.com>
|
|
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
|
---
|
|
src/conf/domain_audit.c | 4 +---
|
|
src/lxc/lxc_controller.c | 4 +---
|
|
src/lxc/lxc_driver.c | 4 +---
|
|
src/qemu/qemu_domain.c | 4 +---
|
|
src/util/vircgroup.c | 8 +-------
|
|
src/util/virdevmapper.c | 4 +---
|
|
src/util/virutil.c | 4 +---
|
|
tests/vircgroupmock.c | 8 +-------
|
|
8 files changed, 8 insertions(+), 32 deletions(-)
|
|
|
|
diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c
|
|
index fdccc585fb..6d3579e0f6 100644
|
|
--- a/src/conf/domain_audit.c
|
|
+++ b/src/conf/domain_audit.c
|
|
@@ -23,9 +23,7 @@
|
|
|
|
#include <sys/stat.h>
|
|
|
|
-#ifdef MAJOR_IN_MKDEV
|
|
-# include <sys/mkdev.h>
|
|
-#elif MAJOR_IN_SYSMACROS
|
|
+#ifdef __linux__
|
|
# include <sys/sysmacros.h>
|
|
#endif
|
|
|
|
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
|
|
index 42c631ed0b..0da89dba89 100644
|
|
--- a/src/lxc/lxc_controller.c
|
|
+++ b/src/lxc/lxc_controller.c
|
|
@@ -25,9 +25,7 @@
|
|
#include <sys/wait.h>
|
|
#include <sys/socket.h>
|
|
|
|
-#ifdef MAJOR_IN_MKDEV
|
|
-# include <sys/mkdev.h>
|
|
-#elif MAJOR_IN_SYSMACROS
|
|
+#ifdef __linux__
|
|
# include <sys/sysmacros.h>
|
|
#endif
|
|
|
|
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
|
|
index 780c6ed4a2..a8c93dd228 100644
|
|
--- a/src/lxc/lxc_driver.c
|
|
+++ b/src/lxc/lxc_driver.c
|
|
@@ -25,9 +25,7 @@
|
|
#include <sched.h>
|
|
#include <sys/utsname.h>
|
|
|
|
-#ifdef MAJOR_IN_MKDEV
|
|
-# include <sys/mkdev.h>
|
|
-#elif MAJOR_IN_SYSMACROS
|
|
+#ifdef __linux__
|
|
# include <sys/sysmacros.h>
|
|
#endif
|
|
|
|
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
|
index 1e968368ae..ffe88ff027 100644
|
|
--- a/src/qemu/qemu_domain.c
|
|
+++ b/src/qemu/qemu_domain.c
|
|
@@ -64,9 +64,7 @@
|
|
#include "backup_conf.h"
|
|
#include "virdevmapper.h"
|
|
|
|
-#ifdef MAJOR_IN_MKDEV
|
|
-# include <sys/mkdev.h>
|
|
-#elif MAJOR_IN_SYSMACROS
|
|
+#ifdef __linux__
|
|
# include <sys/sysmacros.h>
|
|
#endif
|
|
#include <sys/time.h>
|
|
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
|
|
index dff2f6fd3a..a45c2e7f2f 100644
|
|
--- a/src/util/vircgroup.c
|
|
+++ b/src/util/vircgroup.c
|
|
@@ -25,13 +25,7 @@
|
|
# include <sys/mount.h>
|
|
# include <fcntl.h>
|
|
# include <sys/stat.h>
|
|
-
|
|
-# ifdef MAJOR_IN_MKDEV
|
|
-# include <sys/mkdev.h>
|
|
-# elif MAJOR_IN_SYSMACROS
|
|
-# include <sys/sysmacros.h>
|
|
-# endif
|
|
-
|
|
+# include <sys/sysmacros.h>
|
|
# include <sys/types.h>
|
|
# include <signal.h>
|
|
# include <dirent.h>
|
|
diff --git a/src/util/virdevmapper.c b/src/util/virdevmapper.c
|
|
index c346432d86..40a82285f9 100644
|
|
--- a/src/util/virdevmapper.c
|
|
+++ b/src/util/virdevmapper.c
|
|
@@ -20,9 +20,7 @@
|
|
|
|
#include <config.h>
|
|
|
|
-#ifdef MAJOR_IN_MKDEV
|
|
-# include <sys/mkdev.h>
|
|
-#elif MAJOR_IN_SYSMACROS
|
|
+#ifdef __linux__
|
|
# include <sys/sysmacros.h>
|
|
#endif
|
|
|
|
diff --git a/src/util/virutil.c b/src/util/virutil.c
|
|
index 17fd06dbb2..5e6bbb37c0 100644
|
|
--- a/src/util/virutil.c
|
|
+++ b/src/util/virutil.c
|
|
@@ -28,9 +28,7 @@
|
|
#include <poll.h>
|
|
#include <sys/stat.h>
|
|
|
|
-#ifdef MAJOR_IN_MKDEV
|
|
-# include <sys/mkdev.h>
|
|
-#elif MAJOR_IN_SYSMACROS
|
|
+#ifdef __linux__
|
|
# include <sys/sysmacros.h>
|
|
#endif
|
|
|
|
diff --git a/tests/vircgroupmock.c b/tests/vircgroupmock.c
|
|
index 9ec3b576d2..66b8c01852 100644
|
|
--- a/tests/vircgroupmock.c
|
|
+++ b/tests/vircgroupmock.c
|
|
@@ -23,13 +23,7 @@
|
|
# include <unistd.h>
|
|
# include <fcntl.h>
|
|
# include <sys/stat.h>
|
|
-
|
|
-# ifdef MAJOR_IN_MKDEV
|
|
-# include <sys/mkdev.h>
|
|
-# elif MAJOR_IN_SYSMACROS
|
|
-# include <sys/sysmacros.h>
|
|
-# endif
|
|
-
|
|
+# include <sys/sysmacros.h>
|
|
# include <stdarg.h>
|
|
# include "testutilslxc.h"
|
|
# include "virstring.h"
|
|
--
|
|
2.28.0
|
|
|