GModule *module;
gboolean ret;
gpointer ptr;
+#if GLIB_CHECK_VERSION(2,25,0)
+ GStatBuf file_status;
+#else
struct stat file_status;
+#endif
GstRegistry *registry;
gboolean new_plugin = TRUE;
}
static guint
-gst_plugin_ext_dep_get_hash_from_stat_entry (struct stat *s)
+gst_plugin_ext_dep_get_hash_from_stat_entry (
+#if GLIB_CHECK_VERSION(2,25,0)
+ GStatBuf * s
+#else
+ struct stat *s
+#endif
+ )
{
if (!(s->st_mode & (S_IFDIR | S_IFREG)))
return (guint) - 1;
GDir *dir;
guint hash = 0;
- recurse_dirs = !!(flags & GST_PLUGIN_DEPENDENCY_FLAG_RECURSE);
+ recurse_dirs = ! !(flags & GST_PLUGIN_DEPENDENCY_FLAG_RECURSE);
dir = g_dir_open (path, 0, &err);
if (dir == NULL) {
* the same order, and not in a random order */
while ((entry = g_dir_read_name (dir))) {
gboolean have_match;
+#if GLIB_CHECK_VERSION(2,25,0)
+ GStatBuf s;
+#else
struct stat s;
+#endif
gchar *full_path;
guint fhash;
if (filenames == NULL || *filenames == NULL)
filenames = empty_filenames;
- recurse_into_dirs = !!(flags & GST_PLUGIN_DEPENDENCY_FLAG_RECURSE);
- partial_names = !!(flags & GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX);
+ recurse_into_dirs = ! !(flags & GST_PLUGIN_DEPENDENCY_FLAG_RECURSE);
+ partial_names = ! !(flags & GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX);
/* if we can construct the exact paths to check with the data we have, just
* stat them one by one; this is more efficient than opening the directory
* and going through each entry to see if it matches one of our filenames. */
if (!recurse_into_dirs && !partial_names) {
for (i = 0; filenames[i] != NULL; ++i) {
+#if GLIB_CHECK_VERSION(2,25,0)
+ GStatBuf s;
+#else
struct stat s;
+#endif
+
gchar *full_path;
guint fhash;
return FALSE;
while ((dirent = g_dir_read_name (dir))) {
+#if GLIB_CHECK_VERSION(2,25,0)
+ GStatBuf file_status;
+#else
struct stat file_status;
+#endif
filename = g_build_filename (path, dirent, NULL);
if (g_stat (filename, &file_status) < 0) {