From owner-svn-ports-head@freebsd.org Thu Jun 25 16:04:50 2020 Return-Path: Delivered-To: svn-ports-head@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 2B22335E8B1; Thu, 25 Jun 2020 16:04:50 +0000 (UTC) (envelope-from jbeich@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49t4bQ0D4Bz4FsJ; Thu, 25 Jun 2020 16:04:50 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02B49256E6; Thu, 25 Jun 2020 16:04:50 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PG4nmf048608; Thu, 25 Jun 2020 16:04:49 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PG4n8o048606; Thu, 25 Jun 2020 16:04:49 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <202006251604.05PG4n8o048606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Thu, 25 Jun 2020 16:04:49 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r540400 - in head/www/firefox: . files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: in head/www/firefox: . files X-SVN-Commit-Revision: 540400 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 16:04:50 -0000 Author: jbeich Date: Thu Jun 25 16:04:49 2020 New Revision: 540400 URL: https://svnweb.freebsd.org/changeset/ports/540400 Log: www/firefox: unbreak Wayland on FreeBSD < 13 after r539972 shm_open object doesn't support posix_fallocate on old kernels which leads to a crash. PR: 247329 Reported by: ashish Modified: head/www/firefox/Makefile (contents, props changed) head/www/firefox/files/patch-bug1618914 (contents, props changed) Modified: head/www/firefox/Makefile ============================================================================== --- head/www/firefox/Makefile Thu Jun 25 15:54:55 2020 (r540399) +++ head/www/firefox/Makefile Thu Jun 25 16:04:49 2020 (r540400) @@ -3,6 +3,7 @@ PORTNAME= firefox DISTVERSION= 78.0 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= www MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ Modified: head/www/firefox/files/patch-bug1618914 ============================================================================== --- head/www/firefox/files/patch-bug1618914 Thu Jun 25 15:54:55 2020 (r540399) +++ head/www/firefox/files/patch-bug1618914 Thu Jun 25 16:04:49 2020 (r540400) @@ -4,14 +4,15 @@ diff --git widget/gtk/WindowSurfaceWayland.cpp widget/ index 9a73326399bd5..9e42a7f1c5d18 100644 --- widget/gtk/WindowSurfaceWayland.cpp +++ widget/gtk/WindowSurfaceWayland.cpp -@@ -222,19 +222,20 @@ static int WaylandAllocateShmMemory(int aSize) { +@@ -222,20 +222,21 @@ static int WaylandAllocateShmMemory(int aSize) { + #ifdef HAVE_POSIX_FALLOCATE do { ret = posix_fallocate(fd, 0, aSize); } while (ret == EINTR); - if (ret != 0) { + if (ret == 0) { + return fd; -+ } else if (ret != EINVAL && ret != EOPNOTSUPP) { ++ } else if (ret != ENODEV && ret != EINVAL && ret != EOPNOTSUPP) { close(fd); MOZ_CRASH("posix_fallocate() fails to allocate shm memory"); } @@ -28,12 +29,13 @@ index 9a73326399bd5..9e42a7f1c5d18 100644 return fd; } -@@ -265,7 +266,7 @@ bool WaylandShmPool::Resize(int aSize) { +@@ -265,8 +266,8 @@ bool WaylandShmPool::Resize(int aSize) { + #ifdef HAVE_POSIX_FALLOCATE do { errno = posix_fallocate(mShmPoolFd, 0, aSize); } while (errno == EINTR); - if (errno != 0) return false; -+ if (errno != 0 && errno != EINVAL && errno != EOPNOTSUPP) return false; ++ if (errno != 0 && errno != ENODEV && errno != EINVAL && errno != EOPNOTSUPP) return false; #endif wl_shm_pool_resize(mShmPool, aSize);