tools: fix compiler warning
[platform/upstream/gstreamer.git] / tools / tools.h
index 839a4ca..93ac542 100644 (file)
@@ -23,6 +23,9 @@
 #ifndef __GST_TOOLS_H__
 #define __GST_TOOLS_H__
 
+#include <stdlib.h>
+
+#include <gst/gst.h>
 #include "gst/gst-i18n-app.h"
 
 /*
@@ -41,12 +44,6 @@ static gboolean __gst_tools_version = FALSE;
 static void
 gst_tools_print_version (const gchar * tool)
 {
-  gchar *s;
-
-  s = g_strdup_printf ("%s-%u.%u", tool, GST_VERSION_MAJOR, GST_VERSION_MINOR);
-  g_set_prgname (s);
-  g_free (s);
-
   if (__gst_tools_version) {
     gchar *version_str;
 
@@ -60,4 +57,14 @@ gst_tools_print_version (const gchar * tool)
   }
 }
 
+static void
+gst_tools_set_prgname (const gchar * tool)
+{
+  gchar *s;
+
+  s = g_strdup_printf ("%s-%u.%u", tool, GST_VERSION_MAJOR, GST_VERSION_MINOR);
+  g_set_prgname (s);
+  g_free (s);
+}
+
 #endif /* __GST_TOOLS_H__ */