From 8969f02fd59cd6514d5157cf35709525b4a5543f Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Tue, 24 Sep 2019 08:55:07 +0300 Subject: [PATCH] lv2: fix build without the debug system ``` FAILED: subprojects/gst-plugins-bad/ext/lv2/b8a2ebe@@gstlv2@sha/gstlv2utils.c.o ../subprojects/gst-plugins-bad/ext/lv2/gstlv2utils.c: In function 'lv2_log_printf': ../subprojects/gst-plugins-bad/ext/lv2/gstlv2utils.c:50:3: error: attempt to use poisoned "gst_debug_log_valist" 50 | gst_debug_log_valist (lv2_debug, GST_LEVEL_INFO, "", "", 0, NULL, fmt, ap); | ^ ../subprojects/gst-plugins-bad/ext/lv2/gstlv2utils.c:50:25: error: 'lv2_debug' undeclared (first use in this function); did you mean 'g_debug'? 50 | gst_debug_log_valist (lv2_debug, GST_LEVEL_INFO, "", "", 0, NULL, fmt, ap); | ^~~~~~~~~ | g_debug ``` --- ext/lv2/gstlv2utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/lv2/gstlv2utils.c b/ext/lv2/gstlv2utils.c index 56794631c6..57986812f1 100644 --- a/ext/lv2/gstlv2utils.c +++ b/ext/lv2/gstlv2utils.c @@ -41,6 +41,7 @@ GST_DEBUG_CATEGORY_EXTERN (lv2_debug); /* - log extension */ +#ifndef GST_DISABLE_GST_DEBUG static int lv2_log_printf (LV2_Log_Handle handle, LV2_URID type, const char *fmt, ...) { @@ -66,6 +67,7 @@ static LV2_Log_Log lv2_log = { static const LV2_Feature lv2_log_feature = { LV2_LOG__log, &lv2_log }; +#endif /* - urid map/unmap extension */ @@ -95,7 +97,9 @@ static const LV2_Feature lv2_unmap_feature = { LV2_URID__unmap, &lv2_unmap }; /* feature list */ static const LV2_Feature *lv2_features[] = { +#ifndef GST_DISABLE_GST_DEBUG &lv2_log_feature, +#endif &lv2_map_feature, &lv2_unmap_feature, NULL