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 |
- |
|
|