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