[vlc-commits] Check for struct pollfd separately from poll, needed for WinNT 6
Rémi Denis-Courmont
git at videolan.org
Sat Aug 20 13:11:24 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 20 13:47:11 2011 +0300| [af1be3f5b6e1fdab76bc11b1120a7c4584b23080] | committer: Rémi Denis-Courmont
Check for struct pollfd separately from poll, needed for WinNT 6
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=af1be3f5b6e1fdab76bc11b1120a7c4584b23080
---
configure.ac | 11 +++++++++++
include/vlc_fixups.h | 5 +++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 21a98e5..7c8c6f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -596,6 +596,17 @@ AC_SEARCH_LIBS(poll, [poll], [
])
])
+dnl Check for struct pollfd
+AC_CHECK_TYPES([struct pollfd],,,
+[#include <sys/types.h>
+#if HAVE_POLL
+# include <poll.h>
+#elif defined (WIN32)
+# include <winsock2.h>
+#endif
+])
+
+dnl Check for connect
LIBS_save="$LIBS"
SOCKET_LIBS=""
AC_SEARCH_LIBS(connect, [socket], [
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index a223384..9ad95f5 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -252,7 +252,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,
@@ -269,7 +269,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 <poll.h>
More information about the vlc-commits
mailing list