-# define opendir vlc_opendir
-# define readdir vlc_readdir
-# define closedir vlc_closedir
-# define rewinddir vlc_rewindir
-# define seekdir vlc_seekdir
-# define telldir vlc_telldir
-VLC_EXPORT( void *, vlc_opendir, ( const char * ) );
-VLC_EXPORT( void *, vlc_readdir, ( void * ) );
-VLC_EXPORT( int, vlc_closedir, ( void * ) );
-VLC_INTERNAL( void, vlc_rewinddir, ( void * ) );
-VLC_INTERNAL( void, vlc_seekdir, ( void *, long ) );
-VLC_INTERNAL( long, vlc_telldir, ( void * ) );
+
+struct pollfd
+{
+ int fd;
+ unsigned events;
+ unsigned revents;
+};
+
+# define poll(a, b, c) vlc_poll(a, b, c)
+#elif defined (HAVE_MAEMO)
+# include <poll.h>
+# define poll(a, b, c) vlc_poll(a, b, c)
+int vlc_poll (struct pollfd *, unsigned, int);
+#endif
+
+#ifndef HAVE_TDESTROY
+# define tdestroy vlc_tdestroy
+#endif
+
+/* Random numbers */
+#ifndef HAVE_NRAND48
+double erand48 (unsigned short subi[3]);
+long jrand48 (unsigned short subi[3]);
+long nrand48 (unsigned short subi[3]);