DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH] eal/linux: fix build with glibc 2.25
@ 2017-04-03  8:35 Jerin Jacob
  2017-04-04 12:51 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Jerin Jacob @ 2017-04-03  8:35 UTC (permalink / raw)
  To: dev; +Cc: thomas.monjalon, ferruh.yigit, Jerin Jacob

glibc 2.25 is warning about if applications depend on
sys/types.h for makedev macro, it expects to be included
from <sys/sysmacros.h>

Found this error while testing with GCC 6.3.1 on archlinux.

lib/librte_eal/linuxapp/eal/eal_pci_uio.c: In function ‘pci_mknod_uio_dev’:
lib/librte_eal/linuxapp/eal/eal_pci_uio.c:134:13:
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);
             ^~~~~~~~~~~~~~~~~

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
Not added the Fixes: tag because this issue is due to glibc change.
---
 lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
index 20a4a665e..fa10329fd 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
@@ -38,6 +38,7 @@
 #include <inttypes.h>
 #include <sys/stat.h>
 #include <sys/mman.h>
+#include <sys/sysmacros.h>
 #include <linux/pci_regs.h>
 
 #if defined(RTE_ARCH_X86)
-- 
2.12.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] eal/linux: fix build with glibc 2.25
  2017-04-03  8:35 [dpdk-dev] [PATCH] eal/linux: fix build with glibc 2.25 Jerin Jacob
@ 2017-04-04 12:51 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2017-04-04 12:51 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dev, ferruh.yigit

2017-04-03 14:05, Jerin Jacob:
> glibc 2.25 is warning about if applications depend on
> sys/types.h for makedev macro, it expects to be included
> from <sys/sysmacros.h>
> 
> Found this error while testing with GCC 6.3.1 on archlinux.
> 
> lib/librte_eal/linuxapp/eal/eal_pci_uio.c: In function ‘pci_mknod_uio_dev’:
> lib/librte_eal/linuxapp/eal/eal_pci_uio.c:134:13:
> 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);
>              ^~~~~~~~~~~~~~~~~
> 
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-04 12:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-03  8:35 [dpdk-dev] [PATCH] eal/linux: fix build with glibc 2.25 Jerin Jacob
2017-04-04 12:51 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).