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

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