]> git.sesse.net Git - vlc/commitdiff
Character devices are not seekable.
authorRémi Denis-Courmont <rem@videolan.org>
Thu, 26 Oct 2006 14:54:39 +0000 (14:54 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Thu, 26 Oct 2006 14:54:39 +0000 (14:54 +0000)
Thanks to Ed Schouten for noticing.

modules/access/file.c

index 7b65345cf108f35479f5b623fe85909fb9c61a5a..8ffce0f7375ca02c533ab40367c1885c33f97bef 100644 (file)
@@ -227,14 +227,13 @@ static int Open( vlc_object_t *p_this )
             p_sys->b_seekable = VLC_TRUE;
         }
 #elif defined( HAVE_SYS_STAT_H )
-        else if( S_ISREG(stat_info.st_mode) || S_ISCHR(stat_info.st_mode) ||
-                 S_ISBLK(stat_info.st_mode) )
+        else if( S_ISREG(stat_info.st_mode) || S_ISBLK(stat_info.st_mode) )
         {
             p_sys->b_seekable = VLC_TRUE;
             p_access->info.i_size = stat_info.st_size;
         }
-        else if( S_ISFIFO(stat_info.st_mode)
-#   if !defined( SYS_BEOS ) && !defined( WIN32 )
+        else if( S_ISCHR(stat_info.st_mode) || S_ISFIFO(stat_info.st_mode)
+#   ifdef S_ISSOCK
                   || S_ISSOCK(stat_info.st_mode)
 #   endif
                )