From 102a342a019f3b48433de71043d8508595ad3460 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Tue, 8 Feb 2022 12:58:52 +1100 Subject: [PATCH] registry: enable relocatable builds for anywhere with dladdr() Such as Linux/BSD's. Matches the Windows/macOS behaviour. Part-of: --- subprojects/gstreamer/gst/gstregistry.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/subprojects/gstreamer/gst/gstregistry.c b/subprojects/gstreamer/gst/gstregistry.c index 3b1906e..a0b5b17 100644 --- a/subprojects/gstreamer/gst/gstregistry.c +++ b/subprojects/gstreamer/gst/gstregistry.c @@ -1569,7 +1569,7 @@ priv_gst_get_relocated_libgstreamer (void) g_free (base_dir); } -#elif defined(__APPLE__) && defined(HAVE_DLADDR) +#elif defined(HAVE_DLADDR) { Dl_info info; @@ -1589,6 +1589,11 @@ priv_gst_get_relocated_libgstreamer (void) return NULL; } } +#else +#warning "Unsupported platform for retrieving the current location of a\ + shared library. Relocatable builds will not work." + GST_WARNING ("Don't know how to retrieve the location of the shared " + "library libgstreamer-" GST_API_VERSION); #endif return dir; -- 2.7.4