diff --git a/x11/libxshmfence/Makefile b/x11/libxshmfence/Makefile index f9b72e5372ca..e0cee43889d2 100644 --- a/x11/libxshmfence/Makefile +++ b/x11/libxshmfence/Makefile @@ -1,17 +1,18 @@ PORTNAME= libxshmfence PORTVERSION= 1.3 +PORTREVISION= 1 CATEGORIES= x11 MAINTAINER= x11@FreeBSD.org COMMENT= Shared memory 'SyncFence' synchronization primitive LICENSE= MIT USES= xorg xorg-cat:lib USE_XORG= xorgproto CONFIGURE_ARGS= --with-shared-memory-dir=/tmp INSTALL_TARGET= install-strip TEST_TARGET= check .include diff --git a/x11/libxshmfence/files/patch-src__xshmfence_alloc.c b/x11/libxshmfence/files/patch-src__xshmfence_alloc.c index e6e0df9a946e..b6e98334e981 100644 --- a/x11/libxshmfence/files/patch-src__xshmfence_alloc.c +++ b/x11/libxshmfence/files/patch-src__xshmfence_alloc.c @@ -1,14 +1,24 @@ --- src/xshmfence_alloc.c.orig 2015-03-04 15:28:23 UTC +++ src/xshmfence_alloc.c -@@ -79,7 +79,11 @@ xshmfence_alloc_shm(void) +@@ -73,13 +73,21 @@ xshmfence_alloc_shm(void) + fd = memfd_create("xshmfence", MFD_CLOEXEC|MFD_ALLOW_SEALING); + if (fd < 0) + #endif ++#ifdef SHM_ANON ++ fd = shm_open(SHM_ANON, O_RDWR|O_CLOEXEC, 0600); ++ if (fd < 0) ++#endif + { + #ifdef O_TMPFILE + fd = open(SHMDIR, O_TMPFILE|O_RDWR|O_CLOEXEC|O_EXCL, 0666); if (fd < 0) #endif { +#ifdef HAVE_MKOSTEMP + fd = mkostemp(template, O_CLOEXEC); +#else fd = mkstemp(template); +#endif if (fd < 0) return fd; unlink(template);