diff --git a/include/vlc_common.h b/include/vlc_common.h index f2e3304c25..544f8dc475 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -932,15 +932,9 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw ) # endif #endif -#if defined(WIN32) || defined(UNDER_CE) VLC_EXPORT( void *, vlc_opendir_wrapper, ( const char * ) ); VLC_EXPORT( struct dirent *, vlc_readdir_wrapper, ( void * ) ); VLC_EXPORT( int, vlc_closedir_wrapper, ( void * ) ); -#else -# define vlc_opendir_wrapper opendir -# define vlc_readdir_wrapper readdir -# define vlc_closedir_wrapper closedir -#endif /* Format type specifiers for 64 bits numbers */ #if defined(__CYGWIN32__) || (!defined(WIN32) && !defined(UNDER_CE)) diff --git a/src/extras/libc.c b/src/extras/libc.c index 259fec68c2..68b9177d9a 100644 --- a/src/extras/libc.c +++ b/src/extras/libc.c @@ -422,6 +422,19 @@ int vlc_closedir_wrapper( void *_p_dir ) free( p_dir ); return 0; } +#else +void *vlc_opendir_wrapper( const char *psz_path ) +{ + return (void *)opendir( psz_path ); +} +struct dirent *vlc_readdir_wrapper( void *_p_dir ) +{ + return readdir( (DIR *)_p_dir ); +} +int vlc_closedir_wrapper( void *_p_dir ) +{ + return closedir( (DIR *)_p_dir ); +} #endif /*****************************************************************************