[dpdk-dev] pci: fix glibc 2.25 warning regarding major/minor definitions

Message ID 20170404123211.5185-1-ndas@suse.de (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation fail Compilation issues

Commit Message

Nirmoy Das April 4, 2017, 12:32 p.m. UTC
  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(+)
  

Comments

Markos Chandras April 4, 2017, 12:50 p.m. UTC | #1
Hi Nirmoy,

On 04/04/2017 01:32 PM, Nirmoy Das wrote:
> 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
  
Markos Chandras April 4, 2017, 12:50 p.m. UTC | #2
On 04/04/2017 01:50 PM, Markos Chandras wrote:
> Hi Nirmoy,
> 
> On 04/04/2017 01:32 PM, Nirmoy Das wrote:
>> 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
> 

Ah never mind I just saw v2.
  

Patch

diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
index 20a4a665e..af0a4a9bc 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
@@ -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>