avformat/file: Check for lstat() instead of dirent.h
Fixes build on mingw Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
1b1c4030ea
commit
d65b9114f3
2
configure
vendored
2
configure
vendored
@ -1788,6 +1788,7 @@ SYSTEM_FUNCS="
|
|||||||
jack_port_get_latency_range
|
jack_port_get_latency_range
|
||||||
kbhit
|
kbhit
|
||||||
localtime_r
|
localtime_r
|
||||||
|
lstat
|
||||||
lzo1x_999_compress
|
lzo1x_999_compress
|
||||||
mach_absolute_time
|
mach_absolute_time
|
||||||
MapViewOfFile
|
MapViewOfFile
|
||||||
@ -5087,6 +5088,7 @@ check_func_headers conio.h kbhit
|
|||||||
check_func_headers io.h setmode
|
check_func_headers io.h setmode
|
||||||
check_func_headers lzo/lzo1x.h lzo1x_999_compress
|
check_func_headers lzo/lzo1x.h lzo1x_999_compress
|
||||||
check_func_headers stdlib.h getenv
|
check_func_headers stdlib.h getenv
|
||||||
|
check_func_headers sys/stat.h lstat
|
||||||
|
|
||||||
check_func_headers windows.h CoTaskMemFree -lole32
|
check_func_headers windows.h CoTaskMemFree -lole32
|
||||||
check_func_headers windows.h GetProcessAffinityMask
|
check_func_headers windows.h GetProcessAffinityMask
|
||||||
|
@ -251,7 +251,7 @@ static int file_close(URLContext *h)
|
|||||||
|
|
||||||
static int file_open_dir(URLContext *h)
|
static int file_open_dir(URLContext *h)
|
||||||
{
|
{
|
||||||
#if HAVE_DIRENT_H
|
#if HAVE_LSTAT
|
||||||
FileContext *c = h->priv_data;
|
FileContext *c = h->priv_data;
|
||||||
|
|
||||||
c->dir = opendir(h->filename);
|
c->dir = opendir(h->filename);
|
||||||
@ -261,12 +261,12 @@ static int file_open_dir(URLContext *h)
|
|||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
return AVERROR(ENOSYS);
|
return AVERROR(ENOSYS);
|
||||||
#endif /* HAVE_DIRENT_H */
|
#endif /* HAVE_LSTAT */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int file_read_dir(URLContext *h, AVIODirEntry **next)
|
static int file_read_dir(URLContext *h, AVIODirEntry **next)
|
||||||
{
|
{
|
||||||
#if HAVE_DIRENT_H
|
#if HAVE_LSTAT
|
||||||
FileContext *c = h->priv_data;
|
FileContext *c = h->priv_data;
|
||||||
struct dirent *dir;
|
struct dirent *dir;
|
||||||
char *fullpath = NULL;
|
char *fullpath = NULL;
|
||||||
@ -319,18 +319,18 @@ static int file_read_dir(URLContext *h, AVIODirEntry **next)
|
|||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
return AVERROR(ENOSYS);
|
return AVERROR(ENOSYS);
|
||||||
#endif /* HAVE_DIRENT_H */
|
#endif /* HAVE_LSTAT */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int file_close_dir(URLContext *h)
|
static int file_close_dir(URLContext *h)
|
||||||
{
|
{
|
||||||
#if HAVE_DIRENT_H
|
#if HAVE_LSTAT
|
||||||
FileContext *c = h->priv_data;
|
FileContext *c = h->priv_data;
|
||||||
closedir(c->dir);
|
closedir(c->dir);
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
return AVERROR(ENOSYS);
|
return AVERROR(ENOSYS);
|
||||||
#endif /* HAVE_DIRENT_H */
|
#endif /* HAVE_LSTAT */
|
||||||
}
|
}
|
||||||
|
|
||||||
URLProtocol ff_file_protocol = {
|
URLProtocol ff_file_protocol = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user