Skip to contentSkip to conversation

pci: fix glibc 2.25 warning regarding major/minor definitions

PATCH Superseded Nirmoy Das 2 participants 3 messages Apr 4, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Nirmoy Das

author
#0 lore raw

PATCH 1/1 pci: fix glibc 2.25 warning regarding major/minor definitions

fixes:
error: In the GNU C Library, "makedev" is defined
by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "makedev", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "makedev", you should undefine it after including <sys/types.h>. [-Werror]

dev = makedev(major, minor);
             ^~~~~~~~~~~~~~~~~
---
 lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 1 +
 1 file changed, 1 insertion(+)
lib/librte_eal/linuxapp/eal/eal_pci_uio.c +1 -0
index 20a4a665e..af0a4a9bc 100644
@@ -39,6 +39,7 @@
 #include <sys/stat.h>
 #include <sys/mman.h>
 #include <linux/pci_regs.h>
+#include <sys/sysmacros.h>
 
 #if defined(RTE_ARCH_X86)
 #include <sys/io.h>
Signature · 1 line
2.12.2
#1 lore raw

Hi Nirmoy,

Quoted 9 lines · Nirmoy Das

fixes:
error: In the GNU C Library, "makedev" is defined
by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "makedev", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "makedev", you should undefine it after including <sys/types.h>. [-Werror] dev = makedev(major, minor);

You forgot the 'Signed-off-by' line which is required for patches.

See doc/guides/contributing/patches.rst

Signature · 4 lines
markos

SUSE LINUX GmbH | GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg) Maxfeldstr. 5, D-90409, Nürnberg
#2 lore raw
Quoted 13 lines · Markos Chandras

Hi Nirmoy,

Quoted 9 lines · Nirmoy Das

fixes:
error: In the GNU C Library, "makedev" is defined
by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "makedev", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "makedev", you should undefine it after including <sys/types.h>. [-Werror] dev = makedev(major, minor);

Quoted 4 lines

You forgot the 'Signed-off-by' line which is required for patches.

See doc/guides/contributing/patches.rst

Ah never mind I just saw v2.

Signature · 4 lines
markos

SUSE LINUX GmbH | GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg) Maxfeldstr. 5, D-90409, Nürnberg