plugin: Only check for S_IFBLK if it is defined
authorNirbheek Chauhan <nirbheek@centricular.com>
Sat, 13 Feb 2016 00:49:52 +0000 (06:19 +0530)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 20 Feb 2016 10:07:25 +0000 (10:07 +0000)
Windows does not define S_IFBLK since it doesn't have block devices

gst/gstplugin.c

index 8bdf1b5..7b5b750 100644 (file)
@@ -1492,7 +1492,12 @@ gst_plugin_ext_dep_extract_env_vars_paths (GstPlugin * plugin,
 static guint
 gst_plugin_ext_dep_get_hash_from_stat_entry (GStatBuf * s)
 {
+#ifdef S_IFBLK
   if (!(s->st_mode & (S_IFDIR | S_IFREG | S_IFBLK | S_IFCHR)))
+#else
+  /* MSVC does not have S_IFBLK */
+  if (!(s->st_mode & (S_IFDIR | S_IFREG | S_IFCHR)))
+#endif
     return (guint) - 1;
 
   /* completely random formula */