[vlc-devel] [PATCH] Win32: define fstat as well as stat
Rafaël Carré
funman at videolan.org
Thu Feb 2 03:00:26 CET 2012
Le 12-02-01 18:03, Naohiro KORIYAMA a écrit :
> Hello,
>
> 2012/2/2 Rafaël Carré <funman at videolan.org>:
>> Le 2012-02-01 17:25, Naohiro KORIYAMA a écrit :
>>> Fix wrong result of stream_Size() on win32 build.
>>>
>>> ---
>>> include/vlc_fs.h | 3 +++
>>> 1 files changed, 3 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/include/vlc_fs.h b/include/vlc_fs.h
>>> index d5b78e2..94b8515 100644
>>> --- a/include/vlc_fs.h
>>> +++ b/include/vlc_fs.h
>>> @@ -69,6 +69,9 @@ static inline void vlc_rewinddir( DIR *dir )
>>> # ifndef stat
>>> # define stat _stati64
>>> # endif
>>> +# ifndef fstat
>>> +# define fstat _fstati64
>>> +# endif
>>> # endif
>>> #endif
>>>
>>
>> Do you know what is the default definition for those ?
>
> On MinGW, these definition are only writtten on sys/stat.h:
> _CRTIMP int __cdecl __MINGW_NOTHROW fstat (int, struct stat*);
> _CRTIMP int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*);
OK.
mingw-w64 define them correctly already but we need this for mingw.org
Patch applied, thanks!
More information about the vlc-devel
mailing list