audio/alsa-plugins: Fix build with JACK option: use of undeclared identifier 'program_invocation_short_name'

pcm_jack.c:606:23: error: use of undeclared identifier 'program_invocation_short_name'
  606 |                 const char *pname = program_invocation_short_name;
      |                                     ^
1 error generated.

Upstream broke build on FreeBSD in commit:
13a645e55a
Pool request:
https://github.com/alsa-project/alsa-plugins/pull/48

PR:		280144
Reported by:	Peter Much <pmc@citylink.dinoex.sub.org>
Tested by:	Peter Much <pmc@citylink.dinoex.sub.org>
Fixes:		1a782b3157 (update 1.2.7.1 → 1.2.12)
MFH:		2024Q4
This commit is contained in:
Vladimir Druzenko
2024-10-18 01:27:28 +03:00
parent f641d910db
commit 65906cb5ed

View File

@@ -0,0 +1,11 @@
--- jack/pcm_jack.c.orig 2024-06-10 09:18:39 UTC
+++ jack/pcm_jack.c
@@ -602,7 +602,7 @@ static int snd_pcm_jack_open(snd_pcm_t **pcmp, const c
}
if (client_name == NULL) {
-#if defined(_GNU_SOURCE)
+#if defined(_GNU_SOURCE) && defined(__linux__)
const char *pname = program_invocation_short_name;
#else
const char *pname = getprogname();