Explicitly include<sys/sysmacros.h>due to upstream
According to https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS;hb=HEAD (glibc changelog) the below happened, therefore explicitly include <sys/sysmacros.h> " ... The macros 'major', 'minor', and 'makedev' are now only available from the header <sys/sysmacros.h>; not from <sys/types.h> or various other headers that happen to include <sys/types.h>. These macros are rarely used, not part of POSIX nor XSI, and their names frequently collide with user code; see https://sourceware.org/bugzilla/show_bug.cgi?id=19239 for further explanation. <sys/sysmacros.h> is a GNU extension. Portable programs that require these macros should first include <sys/types.h>, and then include <sys/sysmacros.h> if __GNU_LIBRARY__ is defined. ... "
This commit is contained in:
		
							parent
							
								
									0f2791f934
								
							
						
					
					
						commit
						ffb4a7f7dd
					
				
							
								
								
									
										57
									
								
								0001-major-and-minor-functions-moved-to-sysmacros.h.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								0001-major-and-minor-functions-moved-to-sysmacros.h.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,57 @@ | ||||
| From fb98a845d155fdfbd45c22a6b062c3cfbe692a0a Mon Sep 17 00:00:00 2001 | ||||
| From: Sebastian Kisela <skisela@redhat.com> | ||||
| Date: Wed, 25 Jul 2018 09:18:33 +0200 | ||||
| Subject: [PATCH] major and minor functions moved to sysmacros.h | ||||
| 
 | ||||
| According to https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS;hb=HEAD | ||||
| (glibc changelog) the below happened, therefore explicitly include | ||||
| <sys/sysmacros.h> | ||||
| 
 | ||||
| " | ||||
| ... | ||||
| The macros 'major', 'minor', and 'makedev' are now only available from | ||||
| the header <sys/sysmacros.h>; not from <sys/types.h> or various other | ||||
| headers that happen to include <sys/types.h>.  These macros are rarely | ||||
| used, not part of POSIX nor XSI, and their names frequently collide with | ||||
| user code; see https://sourceware.org/bugzilla/show_bug.cgi?id=19239 for | ||||
| further explanation. | ||||
| 
 | ||||
| <sys/sysmacros.h> is a GNU extension.  Portable programs that require | ||||
| these macros should first include <sys/types.h>, and then include | ||||
| <sys/sysmacros.h> if __GNU_LIBRARY__ is defined. | ||||
| ... | ||||
| " | ||||
| 
 | ||||
| Signed-off-by: Sebastian Kisela <skisela@redhat.com> | ||||
| ---
 | ||||
|  src/lockdev.c        | 1 + | ||||
|  src/lockdev.c.access | 1 + | ||||
|  2 files changed, 2 insertions(+) | ||||
| 
 | ||||
| diff --git a/src/lockdev.c b/src/lockdev.c
 | ||||
| index 6e69894..ec86f65 100644
 | ||||
| --- a/src/lockdev.c
 | ||||
| +++ b/src/lockdev.c
 | ||||
| @@ -121,6 +121,7 @@
 | ||||
|  #include <sys/stat.h> | ||||
|  #include <sys/file.h> | ||||
|  #include <sys/types.h> | ||||
| +#include <sys/sysmacros.h>
 | ||||
|  #include <sys/wait.h> | ||||
|  #include "lockdev.h" | ||||
|  #include "ttylock.h" | ||||
| diff --git a/src/lockdev.c.access b/src/lockdev.c.access
 | ||||
| index 9a0fca5..3581938 100644
 | ||||
| --- a/src/lockdev.c.access
 | ||||
| +++ b/src/lockdev.c.access
 | ||||
| @@ -117,6 +117,7 @@
 | ||||
|  #include <sys/stat.h> | ||||
|  #include <sys/file.h> | ||||
|  #include <sys/types.h> | ||||
| +#include <sys/sysmacros.h>
 | ||||
|  #include <sys/wait.h> | ||||
|  #include "lockdev.h" | ||||
|  #include "ttylock.h" | ||||
| -- 
 | ||||
| 2.14.4 | ||||
| 
 | ||||
							
								
								
									
										11
									
								
								lockdev.spec
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								lockdev.spec
									
									
									
									
									
								
							| @ -10,7 +10,7 @@ | ||||
| Summary: A library for locking devices | ||||
| Name: lockdev | ||||
| Version: 1.0.4 | ||||
| Release: 0.27.%{checkout}%{?dist} | ||||
| Release: 0.28.%{checkout}%{?dist} | ||||
| License: LGPLv2 | ||||
| Group: System Environment/Libraries | ||||
| URL: https://alioth.debian.org/projects/lockdev/ | ||||
| @ -20,6 +20,7 @@ URL: https://alioth.debian.org/projects/lockdev/ | ||||
| Source0: lockdev-%{version}.%{checkout}.tar.gz | ||||
| 
 | ||||
| Patch1: lockdev-euidaccess.patch | ||||
| Patch2: 0001-major-and-minor-functions-moved-to-sysmacros.h.patch | ||||
| 
 | ||||
| Requires(pre): shadow-utils | ||||
| Requires(post): glibc | ||||
| @ -53,6 +54,7 @@ package contains the development headers. | ||||
| 
 | ||||
| # Replace access() calls with euidaccess() (600636#c33) | ||||
| %patch1 -p1 -b .access | ||||
| %patch2 -p1 | ||||
| 
 | ||||
| %build | ||||
| # Generate version information from git release tag | ||||
| @ -115,6 +117,13 @@ fi | ||||
| %{_includedir}/* | ||||
| 
 | ||||
| %changelog | ||||
| * Wed Jul 25 2018 Sebastian Kisela <skisela@redhat.com> - 1.0.4-0.28. | ||||
| - Explicitly include <sys/sysmacros.h> due to glibc-headers changes. | ||||
| Definition of major and minor macros is no longer transitively included | ||||
| through <sys/types.h>, hence make it explicit. | ||||
| Ref: | ||||
| https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS;hb=HEAD | ||||
| 
 | ||||
| * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-0.27.20111007git | ||||
| - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user