From 831f4e64b4ac434285b8428b4243e9ffdcbcfba4 Mon Sep 17 00:00:00 2001 From: Laxmi Devi Date: Mon, 20 Jan 2020 10:58:29 +0530 Subject: [PATCH] Workaround: JackClient: Fix printf NULL issue vsnprintf implementation on QNX can not handle NULL string parameter and will interrupt, This is a workaround for the same Change-Id: I18c57ec4b596336cea6f3061caf49c0b33afe198 Signed-off-by: Laxmi Devi --- common/JackClient.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/JackClient.cpp b/common/JackClient.cpp index b03dbc25..b8303ab0 100644 --- a/common/JackClient.cpp +++ b/common/JackClient.cpp @@ -34,6 +34,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. using namespace std; +#ifdef __QNXNTO__ +void __attribute__((constructor)) init_output_for_percent_s_NULL_for_clients(); +void init_output_for_percent_s_NULL_for_clients() +{ + extern const char *output_for_percent_s_NULL; + output_for_percent_s_NULL = "(null)"; +} +#endif + namespace Jack {