richardphibel / rpms / systemd

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