From 06e0a9d40c52736919f32578f926bf4d829e77ec Mon Sep 17 00:00:00 2001 Message-Id: <06e0a9d40c52736919f32578f926bf4d829e77ec@dist-git> From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= 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 Signed-off-by: Daniel P. Berrangé (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 Message-Id: Reviewed-by: Jiri Denemark --- 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 -#ifdef MAJOR_IN_MKDEV -# include -#elif MAJOR_IN_SYSMACROS +#ifdef __linux__ # include #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 #include -#ifdef MAJOR_IN_MKDEV -# include -#elif MAJOR_IN_SYSMACROS +#ifdef __linux__ # include #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 #include -#ifdef MAJOR_IN_MKDEV -# include -#elif MAJOR_IN_SYSMACROS +#ifdef __linux__ # include #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 -#elif MAJOR_IN_SYSMACROS +#ifdef __linux__ # include #endif #include 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 # include # include - -# ifdef MAJOR_IN_MKDEV -# include -# elif MAJOR_IN_SYSMACROS -# include -# endif - +# include # include # include # include 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 -#ifdef MAJOR_IN_MKDEV -# include -#elif MAJOR_IN_SYSMACROS +#ifdef __linux__ # include #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 #include -#ifdef MAJOR_IN_MKDEV -# include -#elif MAJOR_IN_SYSMACROS +#ifdef __linux__ # include #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 # include # include - -# ifdef MAJOR_IN_MKDEV -# include -# elif MAJOR_IN_SYSMACROS -# include -# endif - +# include # include # include "testutilslxc.h" # include "virstring.h" -- 2.28.0