Blame SOURCES/0001-major-and-minor-functions-moved-to-sysmacros.h.patch

23fb2f
From fb98a845d155fdfbd45c22a6b062c3cfbe692a0a Mon Sep 17 00:00:00 2001
23fb2f
From: Sebastian Kisela <skisela@redhat.com>
23fb2f
Date: Wed, 25 Jul 2018 09:18:33 +0200
23fb2f
Subject: [PATCH] major and minor functions moved to sysmacros.h
23fb2f
23fb2f
According to https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS;hb=HEAD
23fb2f
(glibc changelog) the below happened, therefore explicitly include
23fb2f
<sys/sysmacros.h>
23fb2f
23fb2f
"
23fb2f
...
23fb2f
The macros 'major', 'minor', and 'makedev' are now only available from
23fb2f
the header <sys/sysmacros.h>; not from <sys/types.h> or various other
23fb2f
headers that happen to include <sys/types.h>.  These macros are rarely
23fb2f
used, not part of POSIX nor XSI, and their names frequently collide with
23fb2f
user code; see https://sourceware.org/bugzilla/show_bug.cgi?id=19239 for
23fb2f
further explanation.
23fb2f
23fb2f
<sys/sysmacros.h> is a GNU extension.  Portable programs that require
23fb2f
these macros should first include <sys/types.h>, and then include
23fb2f
<sys/sysmacros.h> if __GNU_LIBRARY__ is defined.
23fb2f
...
23fb2f
"
23fb2f
23fb2f
Signed-off-by: Sebastian Kisela <skisela@redhat.com>
23fb2f
---
23fb2f
 src/lockdev.c        | 1 +
23fb2f
 src/lockdev.c.access | 1 +
23fb2f
 2 files changed, 2 insertions(+)
23fb2f
23fb2f
diff --git a/src/lockdev.c b/src/lockdev.c
23fb2f
index 6e69894..ec86f65 100644
23fb2f
--- a/src/lockdev.c
23fb2f
+++ b/src/lockdev.c
23fb2f
@@ -121,6 +121,7 @@
23fb2f
 #include <sys/stat.h>
23fb2f
 #include <sys/file.h>
23fb2f
 #include <sys/types.h>
23fb2f
+#include <sys/sysmacros.h>
23fb2f
 #include <sys/wait.h>
23fb2f
 #include "lockdev.h"
23fb2f
 #include "ttylock.h"
23fb2f
diff --git a/src/lockdev.c.access b/src/lockdev.c.access
23fb2f
index 9a0fca5..3581938 100644
23fb2f
--- a/src/lockdev.c.access
23fb2f
+++ b/src/lockdev.c.access
23fb2f
@@ -117,6 +117,7 @@
23fb2f
 #include <sys/stat.h>
23fb2f
 #include <sys/file.h>
23fb2f
 #include <sys/types.h>
23fb2f
+#include <sys/sysmacros.h>
23fb2f
 #include <sys/wait.h>
23fb2f
 #include "lockdev.h"
23fb2f
 #include "ttylock.h"
23fb2f
-- 
23fb2f
2.14.4
23fb2f