summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/configure.ac1
-rw-r--r--src/vppinfra/linux/syscall.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/configure.ac b/src/configure.ac
index 857bd01521a..d9c8a47b582 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -234,6 +234,7 @@ PLUGIN_ENABLED(stn)
###############################################################################
# Dependency checks
###############################################################################
+AC_CHECK_FUNC([memfd_create], [AC_DEFINE([HAVE_MEMFD_CREATE], [1], [Define if memfd exists])])
AM_COND_IF([ENABLE_DPDK_SHARED],
[
diff --git a/src/vppinfra/linux/syscall.h b/src/vppinfra/linux/syscall.h
index f8ec5919f3f..4511b85ac1d 100644
--- a/src/vppinfra/linux/syscall.h
+++ b/src/vppinfra/linux/syscall.h
@@ -39,11 +39,13 @@ move_pages (int pid, unsigned long count, void **pages, const int *nodes,
return syscall (__NR_move_pages, pid, count, pages, nodes, status, flags);
}
+#ifndef HAVE_MEMFD_CREATE
static inline int
memfd_create (const char *name, unsigned int flags)
{
return syscall (__NR_memfd_create, name, flags);
}
+#endif
#endif /* included_linux_syscall_h */