aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/linux/syscall.h
diff options
context:
space:
mode:
authorMarco Varlese <marco.varlese@suse.com>2018-03-06 08:09:04 +0100
committerMarco Varlese <marco.varlese@suse.de>2018-03-28 08:20:29 +0000
commit213831192dc3cc8785c98c97482a3ec46df6dd47 (patch)
tree21b239bff668dc57b4d4ff672fcefd15b4ce0c95 /src/vppinfra/linux/syscall.h
parentae33579befd24b4126e6b9a3ea8538d1c5a30a7b (diff)
glibc 2.27 fix
With glibc 2.27 the memfd_create has been added to the devel libraries. That's causing the internally defined static function to clash with the system wide one. This patch addresses that issue on systems with latest glibc libraries. Change-Id: I788bf49b23d5b5f1cb1c0374e243d8a429178a71 Signed-off-by: Marco Varlese <marco.varlese@suse.com> (cherry picked from commit 3f6ede3ab3df9624ba3682d5bc82c4f2aa2e0506)
Diffstat (limited to 'src/vppinfra/linux/syscall.h')
-rw-r--r--src/vppinfra/linux/syscall.h2
1 files changed, 2 insertions, 0 deletions
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 */