naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
923a60
From 747f3af70c0ee9089e520ccd8917ded397a5cd2a Mon Sep 17 00:00:00 2001
923a60
From: Frantisek Sumsal <fsumsal@redhat.com>
923a60
Date: Thu, 4 Apr 2019 12:21:45 +0200
923a60
Subject: [PATCH] include sys/sysmacros.h in more places
923a60
923a60
Since glibc is moving away from implicitly including sys/sysmacros.h
923a60
all the time via sys/types.h, include the header directly in more
923a60
places.  This seems to cover most makedev/major/minor usage.
923a60
923a60
(cherry picked from commit 27d13af71c3af6b2f9b60556d2c046dbb6e36e23)
923a60
923a60
Resolves: #1694605
923a60
---
923a60
 src/libudev/libudev.h | 1 +
923a60
 src/shared/macro.h    | 1 +
923a60
 src/shared/util.h     | 1 +
923a60
 src/udev/udev.h       | 1 +
923a60
 4 files changed, 4 insertions(+)
923a60
923a60
diff --git a/src/libudev/libudev.h b/src/libudev/libudev.h
923a60
index a94505c09e..cfff02746d 100644
923a60
--- a/src/libudev/libudev.h
923a60
+++ b/src/libudev/libudev.h
923a60
@@ -23,6 +23,7 @@
923a60
 #include <stdarg.h>
923a60
 #include <sys/types.h>
923a60
 #include <sys/stat.h>
923a60
+#include <sys/sysmacros.h>
923a60
 
923a60
 #ifdef __cplusplus
923a60
 extern "C" {
923a60
diff --git a/src/shared/macro.h b/src/shared/macro.h
923a60
index d4cdb1d08b..d490406483 100644
923a60
--- a/src/shared/macro.h
923a60
+++ b/src/shared/macro.h
923a60
@@ -23,6 +23,7 @@
923a60
 
923a60
 #include <assert.h>
923a60
 #include <sys/param.h>
923a60
+#include <sys/sysmacros.h>
923a60
 #include <sys/types.h>
923a60
 #include <sys/uio.h>
923a60
 #include <inttypes.h>
923a60
diff --git a/src/shared/util.h b/src/shared/util.h
923a60
index d89f0d34a1..538ca4be2d 100644
923a60
--- a/src/shared/util.h
923a60
+++ b/src/shared/util.h
923a60
@@ -45,6 +45,7 @@
923a60
 #include <mntent.h>
923a60
 #include <sys/socket.h>
923a60
 #include <sys/inotify.h>
923a60
+#include <sys/sysmacros.h>
923a60
 #include <glob.h>
923a60
 
923a60
 #if SIZEOF_PID_T == 4
923a60
diff --git a/src/udev/udev.h b/src/udev/udev.h
923a60
index dece6eccab..281b2e5ce5 100644
923a60
--- a/src/udev/udev.h
923a60
+++ b/src/udev/udev.h
923a60
@@ -20,6 +20,7 @@
923a60
 
923a60
 #include <sys/types.h>
923a60
 #include <sys/param.h>
923a60
+#include <sys/sysmacros.h>
923a60
 #include <signal.h>
923a60
 
923a60
 #include "macro.h"