eal/linux: fix build functions pread and pwrite
authorMarvin Liu <yong.liu@intel.com>
Thu, 19 Mar 2015 03:16:58 +0000 (11:16 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 22 Mar 2015 23:30:47 +0000 (00:30 +0100)
Function pread need macro _XOPEN_SOURCE be defined.
Add _GNU_SOURCE will fix this issue.

error: implicit declaration of function â€˜pread’

Fixes: 4a499c649590 ("eal/linux: enable uio_pci_generic support")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
lib/librte_eal/linuxapp/eal/Makefile

index 23c2d48..01f7b70 100644 (file)
@@ -92,12 +92,14 @@ SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_common_options.c
 SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_common_thread.c
 
 CFLAGS_eal.o := -D_GNU_SOURCE
+CFLAGS_eal_interrupts.o := -D_GNU_SOURCE
 CFLAGS_eal_lcore.o := -D_GNU_SOURCE
 CFLAGS_eal_thread.o := -D_GNU_SOURCE
 CFLAGS_eal_log.o := -D_GNU_SOURCE
 CFLAGS_eal_common_log.o := -D_GNU_SOURCE
 CFLAGS_eal_hugepage_info.o := -D_GNU_SOURCE
 CFLAGS_eal_pci.o := -D_GNU_SOURCE
+CFLAGS_eal_pci_uio.o := -D_GNU_SOURCE
 CFLAGS_eal_pci_vfio.o := -D_GNU_SOURCE
 CFLAGS_eal_common_whitelist.o := -D_GNU_SOURCE
 CFLAGS_eal_common_options.o := -D_GNU_SOURCE