From 3d9525f944f4b55256da59463ecccbfc3f0dfd13 Mon Sep 17 00:00:00 2001 From: SASANO Takayoshi Date: Tue, 3 Jan 2023 17:38:13 +0900 Subject: [PATCH] remove unused , use getprogname() for *BSDs Closes: https://github.com/alsa-project/alsa-plugins/pull/48 Signed-off-by: SASANO Takayoshi Signed-off-by: Jaroslav Kysela --- jack/pcm_jack.c | 5 ++++- usb_stream/pcm_usb_stream.c | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/jack/pcm_jack.c b/jack/pcm_jack.c index f266a35..0bdb688 100644 --- a/jack/pcm_jack.c +++ b/jack/pcm_jack.c @@ -23,7 +23,6 @@ #define _GNU_SOURCE #include #include -#include #include #include #include @@ -603,7 +602,11 @@ static int snd_pcm_jack_open(snd_pcm_t **pcmp, const char *name, } if (client_name == NULL) { +#if defined(__linux__) const char *pname = program_invocation_short_name; +#else + const char *pname = getprogname(); +#endif if (!pname[0]) { pname = "alsa-jack"; } diff --git a/usb_stream/pcm_usb_stream.c b/usb_stream/pcm_usb_stream.c index 02d2f43..86ec1a3 100644 --- a/usb_stream/pcm_usb_stream.c +++ b/usb_stream/pcm_usb_stream.c @@ -19,7 +19,6 @@ */ #define _GNU_SOURCE -#include #include #include #include -- 2.47.1