[dpdk-dev,6/6] fix build error for implicit declaration of function pread

Message ID 1426735018-19411-9-git-send-email-yong.liu@intel.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Marvin Liu March 19, 2015, 3:16 a.m. UTC
  From: Marvin Liu <yong.liu@intel.com>

Function pread need marco _XOPEN_SOURCE be defined.
Add _GNU_SOURCE will fix this issue.

error: implicit declaration of function ‘pread’

Signed-off-by: Marvin Liu <yong.liu@intel.com>
  

Patch

diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
index 23c2d48..21875b8 100644
--- a/lib/librte_eal/linuxapp/eal/Makefile
+++ b/lib/librte_eal/linuxapp/eal/Makefile
@@ -102,6 +102,8 @@  CFLAGS_eal_pci_vfio.o := -D_GNU_SOURCE
 CFLAGS_eal_common_whitelist.o := -D_GNU_SOURCE
 CFLAGS_eal_common_options.o := -D_GNU_SOURCE
 CFLAGS_eal_common_thread.o := -D_GNU_SOURCE
+CFLAGS_eal_pci_uio.o := -D_GNU_SOURCE
+CFLAGS_eal_interrupts.o := -D_GNU_SOURCE
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603