debugutils: Fix static linking on OS X
authorJosep Torra <josep@fluendo.com>
Fri, 25 May 2012 08:28:40 +0000 (10:28 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 25 May 2012 08:49:47 +0000 (10:49 +0200)
The linking behaviour of external variables that are not initialized
in the compilation unit where they are defined is undefined. On OS X
this causes a linking failure when statically linking GStreamer.

gst/gst.c
gst/gstdebugutils.c

index 3236916..96c20b5 100644 (file)
--- a/gst/gst.c
+++ b/gst/gst.c
@@ -139,7 +139,7 @@ extern gboolean _priv_gst_disable_registry_update;
 #endif
 
 #ifndef GST_DISABLE_GST_DEBUG
-extern const gchar *priv_gst_dump_dot_dir;
+const gchar *priv_gst_dump_dot_dir;
 #endif
 
 /* defaults */
index 8e31bde..e67a77c 100644 (file)
@@ -54,7 +54,7 @@
 
 /*** PIPELINE GRAPHS **********************************************************/
 
-const gchar *priv_gst_dump_dot_dir;     /* NULL *//* set from gst.c */
+extern const gchar *priv_gst_dump_dot_dir;      /* NULL *//* set from gst.c */
 
 const gchar spaces[] = {
   "                                "    /* 32 */