X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_fixups.h;h=dee3dbd397dc3fdce3429085857dfc31afca7aa7;hb=9367ce0b3a40851a656e136557347fe8e830770c;hp=929ad07a1cdf41f2d61b52d863b536634e0091d6;hpb=bfdbe1557034702b525a85aba49cea7aebfba3bd;p=vlc diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h index 929ad07a1c..dee3dbd397 100644 --- a/include/vlc_fixups.h +++ b/include/vlc_fixups.h @@ -50,8 +50,7 @@ typedef struct #if !defined (HAVE_STRLCPY) || \ !defined (HAVE_STRNDUP) || \ - !defined (HAVE_STRNLEN) || \ - !defined (HAVE_GETCWD) + !defined (HAVE_STRNLEN) # include /* size_t */ #endif @@ -65,7 +64,8 @@ typedef struct # include /* ssize_t, pid_t */ #endif -#ifndef HAVE_DIRFD +#if !defined (HAVE_DIRFD) || \ + !defined (HAVE_FDOPENDIR) # include #endif @@ -173,14 +173,14 @@ struct tm *localtime_r (const time_t *, struct tm *); #endif /* unistd.h */ -#ifndef HAVE_GETCWD -char *getcwd (char *buf, size_t size); -#endif - #ifndef HAVE_GETPID pid_t getpid (void); #endif +#ifndef HAVE_FSYNC +int fsync (int fd); +#endif + /* dirent.h */ #ifndef HAVE_DIRFD #ifdef __APPLE__ @@ -189,6 +189,10 @@ pid_t getpid (void); int dirfd (DIR *); #endif +#ifndef HAVE_FDOPENDIR +DIR *fdopendir (int); +#endif + #ifdef __cplusplus } /* extern "C" */ #endif @@ -253,7 +257,7 @@ void swab (const void *, void *, ssize_t); # define inet_ntop vlc_inet_ntop #endif -#ifndef HAVE_POLL +#ifndef HAVE_STRUCT_POLLFD enum { POLLIN=1, @@ -270,7 +274,8 @@ struct pollfd unsigned events; unsigned revents; }; - +#endif +#ifndef HAVE_POLL # define poll(a, b, c) vlc_poll(a, b, c) #elif defined (HAVE_MAEMO) # include @@ -279,12 +284,15 @@ int vlc_poll (struct pollfd *, unsigned, int); #endif #ifndef HAVE_IF_NAMEINDEX +#include struct if_nameindex { unsigned if_index; char *if_name; }; -# define if_nametoindex(name) atoi(name) +# ifndef HAVE_IF_NAMETOINDEX +# define if_nametoindex(name) atoi(name) +# endif # define if_nameindex() (errno = ENOBUFS, NULL) # define if_freenameindex(list) (void)0 #endif