From owner-svn-ports-all@FreeBSD.ORG Sun May 31 16:12:18 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2BBC68C; Sun, 31 May 2015 16:12:18 +0000 (UTC) (envelope-from kwm@FreeBSD.org) 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 B0F021283; Sun, 31 May 2015 16:12:18 +0000 (UTC) (envelope-from kwm@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VGCIdA033670; Sun, 31 May 2015 16:12:18 GMT (envelope-from kwm@FreeBSD.org) Received: (from kwm@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VGCIXB033668; Sun, 31 May 2015 16:12:18 GMT (envelope-from kwm@FreeBSD.org) Message-Id: <201505311612.t4VGCIXB033668@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kwm set sender to kwm@FreeBSD.org using -f From: Koop Mast Date: Sun, 31 May 2015 16:12:18 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r388121 - in head/audio/pulseaudio: . 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.20 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: Sun, 31 May 2015 16:12:19 -0000 Author: kwm Date: Sun May 31 16:12:17 2015 New Revision: 388121 URL: https://svnweb.freebsd.org/changeset/ports/388121 Log: Fix a segfault by using some FreeBSD sysctl to get the info needed. This can happen when /proc isn't mounted. While here, teach where the dbus machine-id file lives. > Description of fields to fill in above: 76 columns --| > PR: If a GNATS PR is affected by the change. > Differential Revision: https://reviews.freebsd.org/D### (*full* phabric URL needed). > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > MFH: Ports tree branch name. Request approval for merge. > Relnotes: Set to 'yes' for mention in release notes. > Security: Vulnerability reference (one per line) or description. > Sponsored by: If the change was sponsored by an organization. > Empty fields above will be automatically removed. M pulseaudio/Makefile AM pulseaudio/files/patch-src_pulse_util.c Added: head/audio/pulseaudio/files/patch-src_pulse_util.c (contents, props changed) Modified: head/audio/pulseaudio/Makefile Modified: head/audio/pulseaudio/Makefile ============================================================================== --- head/audio/pulseaudio/Makefile Sun May 31 16:10:35 2015 (r388120) +++ head/audio/pulseaudio/Makefile Sun May 31 16:12:17 2015 (r388121) @@ -6,6 +6,7 @@ PORTNAME= pulseaudio PORTVERSION= 6.0 +PORTREVISION= 1 CATEGORIES= audio MASTER_SITES= http://freedesktop.org/software/pulseaudio/releases/ @@ -84,6 +85,7 @@ post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/src/daemon/default.pa.in @${REINPLACE_CMD} -e 's|-Wmissing-include-dirs||g' \ + -e 's|/lib/dbus/machine-id|/db/dbus/machine-id|g' \ ${WRKSRC}/configure post-install: Added: head/audio/pulseaudio/files/patch-src_pulse_util.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/pulseaudio/files/patch-src_pulse_util.c Sun May 31 16:12:17 2015 (r388121) @@ -0,0 +1,35 @@ +--- src/pulse/util.c.orig 2015-02-12 15:10:35.000000000 +0100 ++++ src/pulse/util.c 2015-05-31 17:50:08.221242000 +0200 +@@ -30,6 +30,10 @@ + #include + #include + #include ++#ifdef __FreeBSD__ ++#include ++#include ++#endif + + #ifdef HAVE_PWD_H + #include +@@ -215,13 +219,14 @@ char *pa_get_binary_name(char *s, size_t + + #ifdef __FreeBSD__ + { +- char *rp; +- +- if ((rp = pa_readlink("/proc/curproc/file"))) { +- pa_strlcpy(s, pa_path_get_filename(rp), l); +- pa_xfree(rp); +- return s; +- } ++ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()}; ++ struct kinfo_proc kp; ++ size_t sz = sizeof(kp); ++ ++ if (sysctl(mib, 4, &kp, &sz, NULL, 0) == 0) ++ return kp.ki_comm; ++ else ++ return NULL; + } + #endif +