eal/linux: fix build
authorThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 3 Mar 2015 08:37:54 +0000 (09:37 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 3 Mar 2015 22:21:33 +0000 (23:21 +0100)
Compilation fails in some distributions because of missing unistd.h
needed for pread/pwrite (seen with Suse):
lib/librte_eal/linuxapp/eal/eal_pci_uio.c:62:2:
error: implicit declaration of function â€˜pread’

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

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: David Marchand <david.marchand@6wind.com>
lib/librte_eal/linuxapp/eal/eal_pci_uio.c

index 35d31c5..0b397ca 100644 (file)
@@ -32,6 +32,7 @@
  */
 
 #include <string.h>
+#include <unistd.h>
 #include <fcntl.h>
 #include <dirent.h>
 #include <sys/stat.h>