]> git.sesse.net Git - vlc/blobdiff - include/vlc_network.h
poll() replacement
[vlc] / include / vlc_network.h
index 8bcbac7244ad65818c58dcf21aea5e2bec13f476..36b64c5d04810fb7fec388cb1ba5dee1128d5872 100644 (file)
@@ -2,6 +2,7 @@
  * vlc_network.h: interface to communicate with network plug-ins
  *****************************************************************************
  * Copyright (C) 2002-2005 the VideoLAN team
+ * Copyright © 2006-2007 Rémi Denis-Courmont
  * $Id$
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
@@ -140,6 +141,27 @@ VLC_EXPORT( int, __net_vaPrintf, ( vlc_object_t *p_this, int fd, const v_socket_
 int inet_pton(int af, const char *src, void *dst);
 #endif
 
+#ifndef HAVE_POLL
+enum
+{
+    POLLIN=1,
+    POLLOUT=2,
+    POLLPRI=4
+    POLLERR=8,  // unsupported stub
+    POLLHUP=16, // unsupported stub
+    POLLNVAL=32 // unsupported stub
+};
+
+struct pollfd
+{
+       int fd;
+       int events;
+       int revents;
+};
+
+int poll (struct pollfd *fds, unsigned nfds, int timeout);
+#endif
+
 
 /*****************************************************************************
  * net_StopRecv/Send