|
When Autotools makes configuration of LXC, the check of
the memfd_create() function fails because __stub_memfd_create and
__stub___memfd_create (The GNU C library defines this for functions
which it implements to always fail with ENOSYS) are defined in Glibc,
which leads to the fact that the macro HAVE_MEMFD_CREATE is not
defined and LXC provides defintion of the memfd_create() function as
static inline which in turn conflicts with a definition from
the <bits/mman-shared.h> file and causes an error:
| In file included from ../../../lxc-3.2.1/src/lxc/conf.c:79:
| <src_path>//lxc/syscall_wrappers.h:77:19: error: static declaration
| of 'memfd_create' follows non-static declaration
| | static inline int memfd_create(const char *name, unsigned int flags) {
| | ^~~~~~~~~~~~
| In file included from /usr/include/bits/mman-linux.h:111,
| from /usr/include/bits/mman.h:34,
| from /usr/include/sys/mman.h:41,
| from <src_path>/lxc-3.2.1/src/lxc/conf.c:42:
| /usr/include/bits/mman-shared.h:50:5: note: previous declaration
| of 'memfd_create' was here
| | int memfd_create (const char *__name, unsigned int __flags) __THROW;
| | ^~~~~~~~~~~~
Upstream PR: https://github.com/lxc/lxc/pull/3168 (merged)
Signed-off-by: Oleksii Kurochko <olkuroch@cisco.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|