Index: head/x11/libxshmfence/Makefile =================================================================== --- head/x11/libxshmfence/Makefile (revision 445015) +++ head/x11/libxshmfence/Makefile (revision 445016) @@ -1,20 +1,20 @@ # $FreeBSD$ PORTNAME= libxshmfence PORTVERSION= 1.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 MAINTAINER= x11@FreeBSD.org COMMENT= Shared memory 'SyncFence' synchronization primitive LICENSE= MIT USE_XORG= xproto XORG_CAT= lib CONFIGURE_ARGS= --with-shared-memory-dir=/tmp INSTALL_TARGET= install-strip TEST_TARGET= check .include Index: head/x11/libxshmfence/files/patch-src__xshmfence_alloc.c =================================================================== --- head/x11/libxshmfence/files/patch-src__xshmfence_alloc.c (revision 445015) +++ head/x11/libxshmfence/files/patch-src__xshmfence_alloc.c (revision 445016) @@ -1,24 +1,14 @@ --- src/xshmfence_alloc.c.orig 2015-03-04 15:28:23 UTC +++ src/xshmfence_alloc.c -@@ -67,15 +67,19 @@ int - xshmfence_alloc_shm(void) - { - char template[] = SHMDIR "/shmfd-XXXXXX"; -- int fd; -+ int fd = -1; - - #if HAVE_MEMFD_CREATE - fd = memfd_create("xshmfence", MFD_CLOEXEC|MFD_ALLOW_SEALING); - if (fd < 0) - #endif - { --#ifdef O_TMPFILE -+#if defined(O_CLOEXEC) -+#if defined(HAVE_MKOSTEMP) -+ fd = mkostemp(template, O_CLOEXEC); -+#elif defined(O_TMPFILE) - fd = open(SHMDIR, O_TMPFILE|O_RDWR|O_CLOEXEC|O_EXCL, 0666); -+#endif +@@ -79,7 +79,11 @@ xshmfence_alloc_shm(void) if (fd < 0) #endif { ++#ifdef HAVE_MKOSTEMP ++ fd = mkostemp(template, O_CLOEXEC); ++#else + fd = mkstemp(template); ++#endif + if (fd < 0) + return fd; + unlink(template);