From owner-freebsd-gnome@freebsd.org Fri Apr 3 18:33:22 2020 Return-Path: Delivered-To: freebsd-gnome@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 005E32641ED for ; Fri, 3 Apr 2020 18:33:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 48v7q400GLz415Z for ; Fri, 3 Apr 2020 18:33:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 0293D263A65; Fri, 3 Apr 2020 18:26:02 +0000 (UTC) Delivered-To: gnome@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 01908263A64 for ; Fri, 3 Apr 2020 18:26:02 +0000 (UTC) (envelope-from bugzilla-noreply@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) server-signature RSA-PSS (4096 bits) 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 48v7fd3pRkz3xM7 for ; Fri, 3 Apr 2020 18:26:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B5799028 for ; Fri, 3 Apr 2020 18:08:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 033I8Xfj082646 for ; Fri, 3 Apr 2020 18:08:33 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 033I8Xa3082634 for gnome@FreeBSD.org; Fri, 3 Apr 2020 18:08:33 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: gnome@FreeBSD.org Subject: [Bug 245156] audio/pulseaudio: parse /dev/sndstat correctly to get device name Date: Fri, 03 Apr 2020 18:08:33 +0000 X-Bugzilla-Reason: CC AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: lightside@gmx.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: gnome@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 18:33:22 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D245156 --- Comment #15 from lightside --- Created attachment 213025 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D213025&action= =3Dedit Testcase 2 Hello, Greg V. (In reply to Greg V from comment #14) > I've included a solution for this that hopefully doesn't break Linux OSS = or > other BSDs (?), and does not use VLAs (variable-length arrays, which are = not > standard C) like `char desc[len + 1]` in attachment 213006 Probably you are right, if VLAs is optional in C11, and PulseAudio changed used C standard from C99 to C11: https://github.com/pulseaudio/pulseaudio/blob/9562e898ddbfe61b29a9914cb7378= bb0f01cc527/NEWS#L265 Changed the C standard from C99 to C11. https://github.com/pulseaudio/pulseaudio/blob/v13.0/configure.ac#L172 AX_CHECK_COMPILE_FLAG([-std=3Dgnu11], But it compiled ok with using base Clang compiler on FreeBSD, in my case. (In reply to Greg V from comment #14) > I'm working on an upstream merge request: > https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277 As about your proposed code for upstreaming, the strcspn function doesn't search in reverse for '>' character. Maybe this is not so important, but attached testcase may show this for "Testcase 1" and how I tried to fix it = with using strrchr function in "Testcase 2": -8<-- char line[] =3D "pcm4: (play/rec) default"; Testcase 1: 4 - Realtek (0x1168) (Rear Analog 5.1/2.0) Testcase 2: 4 - Realtek (0x1168) (Rear Analog 5.1/2.0) char line[] =3D "pcm4: (Rear Analog 5.1/2.0)> (play/r= ec) default"; Testcase 1: 4 - Realtek (0x1168) <# Testcase 2: 4 - Realtek (0x1168) <#> (Rear Analog 5.1/2.0) -->8- --=20 You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug.=