Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 646566
Collapse All | Expand All

(-)a/configure.ac (+3 lines)
Lines 607-612 AS_IF([test "x$enable_memfd" = "xyes" && test "x$HAVE_MEMFD" = "x0"], Link Here
607
    [AC_MSG_ERROR([*** Your Linux kernel does not support memfd shared memory.
607
    [AC_MSG_ERROR([*** Your Linux kernel does not support memfd shared memory.
608
                  *** Use linux v3.17 or higher for such a feature.])])
608
                  *** Use linux v3.17 or higher for such a feature.])])
609
609
610
AS_IF([test "x$HAVE_MEMFD" = "x1"],
611
    AC_CHECK_FUNCS([memfd_create]))
612
610
AC_SUBST(HAVE_MEMFD)
613
AC_SUBST(HAVE_MEMFD)
611
AM_CONDITIONAL([HAVE_MEMFD], [test "x$HAVE_MEMFD" = x1])
614
AM_CONDITIONAL([HAVE_MEMFD], [test "x$HAVE_MEMFD" = x1])
612
AS_IF([test "x$HAVE_MEMFD" = "x1"], AC_DEFINE([HAVE_MEMFD], 1, [Have memfd shared memory.]))
615
AS_IF([test "x$HAVE_MEMFD" = "x1"], AC_DEFINE([HAVE_MEMFD], 1, [Have memfd shared memory.]))
(-)a/src/pulsecore/memfd-wrappers.h (-4 / +4 lines)
Lines 20-32 Link Here
20
  License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
20
  License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
21
***/
21
***/
22
22
23
#ifdef HAVE_MEMFD
23
#if defined(HAVE_MEMFD) && !defined(HAVE_MEMFD_CREATE)
24
24
25
#include <sys/syscall.h>
25
#include <sys/syscall.h>
26
#include <fcntl.h>
26
#include <fcntl.h>
27
27
28
/*
28
/*
29
 * No glibc wrappers exist for memfd_create(2), so provide our own.
29
 * Before glibc version 2.27 there was no wrapper for memfd_create(2),
30
 * so we have to provide our own.
30
 *
31
 *
31
 * Also define memfd fcntl sealing macros. While they are already
32
 * Also define memfd fcntl sealing macros. While they are already
32
 * defined in the kernel header file <linux/fcntl.h>, that file as
33
 * defined in the kernel header file <linux/fcntl.h>, that file as
Lines 63-68 static inline int memfd_create(const char *name, unsigned int flags) { Link Here
63
#define F_SEAL_WRITE    0x0008  /* prevent writes */
64
#define F_SEAL_WRITE    0x0008  /* prevent writes */
64
#endif
65
#endif
65
66
66
#endif /* HAVE_MEMFD */
67
#endif /* HAVE_MEMFD && !HAVE_MEMFD_CREATE */
67
68
68
#endif
69
#endif
69
- 

Return to bug 646566