Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
pipewire.30043
fix-memfd_create-call.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-memfd_create-call.patch of Package pipewire.30043
Index: pipewire-0.3.0/src/examples/video-src-alloc.c =================================================================== --- pipewire-0.3.0.orig/src/examples/video-src-alloc.c +++ pipewire-0.3.0/src/examples/video-src-alloc.c @@ -29,6 +29,7 @@ #include <unistd.h> #include <fcntl.h> #include <sys/mman.h> +#include <sys/syscall.h> #include <spa/param/video/format-utils.h> @@ -45,6 +46,46 @@ #define M_PI_M2 ( M_PI + M_PI ) +#if !defined(HAVE_MEMFD_CREATE) +/* + * No glibc wrappers exist for memfd_create(2), so provide our own. + * + * Also define memfd fcntl sealing macros. While they are already + * defined in the kernel header file <linux/fcntl.h>, that file as + * a whole conflicts with the original glibc header <fnctl.h>. + */ + +static inline int memfd_create(const char *name, unsigned int flags) +{ + return syscall(SYS_memfd_create, name, flags); +} +#endif + +#ifndef MFD_CLOEXEC +#define MFD_CLOEXEC 0x0001U +#endif + +#ifndef MFD_ALLOW_SEALING +#define MFD_ALLOW_SEALING 0x0002U +#endif + +/* fcntl() seals-related flags */ + +#ifndef F_LINUX_SPECIFIC_BASE +#define F_LINUX_SPECIFIC_BASE 1024 +#endif + +#ifndef F_ADD_SEALS +#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9) +#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10) + +#define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */ +#define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */ +#define F_SEAL_GROW 0x0004 /* prevent file from growing */ +#define F_SEAL_WRITE 0x0008 /* prevent writes */ +#endif + + struct data { struct pw_thread_loop *loop; struct spa_source *timer;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor