From owner-svn-ports-all@FreeBSD.ORG Tue Jul 8 21:06:41 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99D02E1C; Tue, 8 Jul 2014 21:06:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E4522162; Tue, 8 Jul 2014 21:06:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s68L6fnZ094372; Tue, 8 Jul 2014 21:06:41 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s68L6fQY094369; Tue, 8 Jul 2014 21:06:41 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201407082106.s68L6fQY094369@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 8 Jul 2014 21:06:41 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r361292 - in head/x11/libxshmfence: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2014 21:06:41 -0000 Author: jkim Date: Tue Jul 8 21:06:40 2014 New Revision: 361292 URL: http://svnweb.freebsd.org/changeset/ports/361292 QAT: https://qat.redports.org/buildarchive/r361292/ Log: Fix xshmfence_alloc_shm() on 8.3 and 9.x. O_CLOEXEC is available on all supported versions but mkostemp(3) is only available from 10.0. Therfore, the fd was not properly initialized on them. Modified: head/x11/libxshmfence/Makefile head/x11/libxshmfence/files/patch-src__xshmfence_alloc.c Modified: head/x11/libxshmfence/Makefile ============================================================================== --- head/x11/libxshmfence/Makefile Tue Jul 8 21:05:36 2014 (r361291) +++ head/x11/libxshmfence/Makefile Tue Jul 8 21:06:40 2014 (r361292) @@ -2,7 +2,7 @@ PORTNAME= libxshmfence PORTVERSION= 1.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= x11 MAINTAINER= x11@FreeBSD.org Modified: head/x11/libxshmfence/files/patch-src__xshmfence_alloc.c ============================================================================== --- head/x11/libxshmfence/files/patch-src__xshmfence_alloc.c Tue Jul 8 21:05:36 2014 (r361291) +++ head/x11/libxshmfence/files/patch-src__xshmfence_alloc.c Tue Jul 8 21:06:40 2014 (r361292) @@ -1,8 +1,11 @@ ---- src/xshmfence_alloc.c 2013-11-20 17:13:08.000000000 -0500 -+++ src/xshmfence_alloc.c 2013-12-09 16:06:17.000000000 -0500 -@@ -41,11 +41,15 @@ +--- src/xshmfence_alloc.c.orig 2013-11-20 17:13:08.000000000 -0500 ++++ src/xshmfence_alloc.c 2014-07-08 16:39:18.000000000 -0400 +@@ -39,10 +39,14 @@ + xshmfence_alloc_shm(void) + { char template[] = SHMDIR "/shmfd-XXXXXX"; - int fd; +- int fd; ++ int fd = -1; -#ifdef O_TMPFILE +#if defined(O_CLOEXEC) @@ -10,11 +13,7 @@ + fd = mkostemp(template, O_CLOEXEC); +#elif defined(O_TMPFILE) fd = open(SHMDIR, O_TMPFILE|O_RDWR|O_CLOEXEC|O_EXCL, 0666); -- if (fd < 0) ++#endif + if (fd < 0) #endif -+ if (fd < 0) { -+#endif - fd = mkstemp(template); - if (fd < 0) - return fd;