summaryrefslogtreecommitdiffstats
path: root/lib/librte_eal/bsdapp
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2018-04-23 14:16:57 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2018-04-23 14:17:34 +0100
commit39157ec04095ab012d11db23c462844634bfbb8f (patch)
tree643f83dc46445aa7834fe271ce2c21a5cb278cee /lib/librte_eal/bsdapp
parent47d9763a1dd3103d732da9eec350cfc1cd784717 (diff)
New upstream version 16.11.5upstream/16.11.5
Change-Id: I47171042629a57c6958d50251351e668ca5f3d8b Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'lib/librte_eal/bsdapp')
-rw-r--r--lib/librte_eal/bsdapp/contigmem/contigmem.c1
-rw-r--r--lib/librte_eal/bsdapp/eal/eal_memory.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/librte_eal/bsdapp/contigmem/contigmem.c b/lib/librte_eal/bsdapp/contigmem/contigmem.c
index e8fb9087..9676d8b3 100644
--- a/lib/librte_eal/bsdapp/contigmem/contigmem.c
+++ b/lib/librte_eal/bsdapp/contigmem/contigmem.c
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include <sys/rwlock.h>
#include <sys/systm.h>
#include <sys/sysctl.h>
+#include <sys/vmmeter.h>
#include <machine/bus.h>
diff --git a/lib/librte_eal/bsdapp/eal/eal_memory.c b/lib/librte_eal/bsdapp/eal/eal_memory.c
index 3614da8d..248312d9 100644
--- a/lib/librte_eal/bsdapp/eal/eal_memory.c
+++ b/lib/librte_eal/bsdapp/eal/eal_memory.c
@@ -150,7 +150,7 @@ rte_eal_hugepage_attach(void)
/* Map the shared hugepage_info into the process address spaces */
hpi = mmap(NULL, sizeof(struct hugepage_info), PROT_READ, MAP_PRIVATE,
fd_hugepage_info, 0);
- if (hpi == NULL) {
+ if (hpi == MAP_FAILED) {
RTE_LOG(ERR, EAL, "Could not mmap %s\n", eal_hugepage_info_path());
goto error;
}