teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0740-include-sys-sysmacros.h-in-more-places.patch

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