mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 13:38:47 +00:00
Use S_ISDIR instead of S_IFMT/S_IFDIR to fix building with gcc in c11 mode.
This commit is contained in:
+1
-1
@@ -114,7 +114,7 @@ int GetFileLength(const char *filename)
|
||||
if(stat(filename,&statbuf) != 0)
|
||||
return(0);
|
||||
|
||||
if((statbuf.st_mode & S_IFMT) == S_IFDIR)
|
||||
if(S_ISDIR(statbuf.st_mode))
|
||||
return(-2); // a directory
|
||||
|
||||
return(statbuf.st_size);
|
||||
|
||||
@@ -298,8 +298,7 @@ int GetFileLength(const char *filename)
|
||||
if(stat(filename,&statbuf) != 0)
|
||||
return(0);
|
||||
|
||||
if((statbuf.st_mode & S_IFMT) == S_IFDIR)
|
||||
// if(S_ISDIR(statbuf.st_mode))
|
||||
if(S_ISDIR(statbuf.st_mode))
|
||||
return(-2); // a directory
|
||||
|
||||
return(statbuf.st_size);
|
||||
|
||||
+1
-2
@@ -138,8 +138,7 @@ int GetFileLength(const char *filename)
|
||||
if(stat(filename,&statbuf) != 0)
|
||||
return(0);
|
||||
|
||||
if((statbuf.st_mode & S_IFMT) == S_IFDIR)
|
||||
// if(S_ISDIR(statbuf.st_mode))
|
||||
if(S_ISDIR(statbuf.st_mode))
|
||||
return(-2); // a directory
|
||||
|
||||
return(statbuf.st_size);
|
||||
|
||||
Reference in New Issue
Block a user