FreeBSD Bugzilla – Attachment 206257 Details for
Bug 239630
x11/libxshmfence: prefer SHM_ANON over mksotemp()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
v1 (has commit message)
bug239630.diff (text/plain), 1.54 KB, created by
Jan Beich
on 2019-08-03 21:30:03 UTC
(
hide
)
Description:
v1 (has commit message)
Filename:
MIME Type:
Creator:
Jan Beich
Created:
2019-08-03 21:30:03 UTC
Size:
1.54 KB
patch
obsolete
>From 65cdceee0d724d6d96c84ee89f722818fefee4ee Mon Sep 17 00:00:00 2001 >From: Jan Beich <jbeich@FreeBSD.org> >Date: Sat, 3 Aug 2019 21:14:43 +0000 >Subject: [PATCH] x11/libxshmfence: prefer SHM_ANON over mksotemp() > >SHM_ANON is faster and more similar to memfd_create() > >PR: 239630 >Approved by: maintainer timeout (2 weeks) >--- > x11/libxshmfence/Makefile | 1 + > x11/libxshmfence/files/patch-src__xshmfence_alloc.c | 12 +++++++++++- > 2 files changed, 12 insertions(+), 1 deletion(-) > >diff --git a/x11/libxshmfence/Makefile b/x11/libxshmfence/Makefile >index 36a9672a672d..502b280f0225 100644 >--- a/x11/libxshmfence/Makefile >+++ b/x11/libxshmfence/Makefile >@@ -2,6 +2,7 @@ > > PORTNAME= libxshmfence > PORTVERSION= 1.3 >+PORTREVISION= 1 > CATEGORIES= x11 > > MAINTAINER= x11@FreeBSD.org >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,6 +1,16 @@ > --- 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 > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
jbeich
:
maintainer-approval?
(
x11
)
Actions:
View
|
Diff
Attachments on
bug 239630
: 206257