From owner-dev-commits-ports-main@freebsd.org Thu May 27 03:31:35 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F039F630C8E; Thu, 27 May 2021 03:31:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FrCzC6Xr9z3hP4; Thu, 27 May 2021 03:31:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C91B81CBEC; Thu, 27 May 2021 03:31:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 14R3VZAp011531; Thu, 27 May 2021 03:31:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14R3VZvY011530; Thu, 27 May 2021 03:31:35 GMT (envelope-from git) Date: Thu, 27 May 2021 03:31:35 GMT Message-Id: <202105270331.14R3VZvY011530@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jan Beich Subject: git: f783260c1c4d - main - x11/libxshmfence: prefer SHM_ANON over mksotemp() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jbeich X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f783260c1c4d7bacbb6d36cab209eab28da49d4e Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 May 2021 03:31:36 -0000 The branch main has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=f783260c1c4d7bacbb6d36cab209eab28da49d4e commit f783260c1c4d7bacbb6d36cab209eab28da49d4e Author: Jan Beich AuthorDate: 2019-08-03 21:14:43 +0000 Commit: Jan Beich CommitDate: 2021-05-27 03:30:56 +0000 x11/libxshmfence: prefer SHM_ANON over mksotemp() SHM_ANON is faster and more similar to memfd_create() PR: 239630 Approved by: jkim --- 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 f9b72e5372ca..e0cee43889d2 100644 --- a/x11/libxshmfence/Makefile +++ b/x11/libxshmfence/Makefile @@ -1,5 +1,6 @@ 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 {