[vlc-devel] [PATCH] compat: poll: fix compilation

KO Myung-Hun komh78 at gmail.com
Thu Aug 28 12:15:58 CEST 2014


-----
  CC       poll.lo
poll.c: In function 'poll':
poll.c:129:13: error: implicit declaration of function 'fcntl' [-Werror=implicit-function-declaration]
             if (fcntl (fds[i].fd, F_GETFD) == -1)
             ^
poll.c:129:35: error: 'F_GETFD' undeclared (first use in this function)
             if (fcntl (fds[i].fd, F_GETFD) == -1)
                                   ^
poll.c:129:35: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
-----
---
 compat/poll.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/compat/poll.c b/compat/poll.c
index 21e6d59..b88f7fd 100644
--- a/compat/poll.c
+++ b/compat/poll.c
@@ -36,6 +36,7 @@
 #else
 # include <sys/time.h>
 # include <sys/select.h>
+# include <fcntl.h>
 #endif
 
 int (poll) (struct pollfd *fds, unsigned nfds, int timeout)
-- 
1.7.3.2




More information about the vlc-devel mailing list