poll() is only used by networking code, so the fallback should
only be built if networking is enabled. Also remove CONFIG_FFSERVER
condition from the declarations.
This should fix building on systems without poll(), broken
by a8475bbdb64e638bd8161df9647876fd23f8a29a.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 362d8f7d9e6a3bca2ce89f767d153d3ab8bf5773)
| ... | ... |
@@ -234,7 +234,6 @@ int ff_socket_nonblock(int socket, int enable) |
| 234 | 234 |
return fcntl(socket, F_SETFL, fcntl(socket, F_GETFL) & ~O_NONBLOCK); |
| 235 | 235 |
#endif |
| 236 | 236 |
} |
| 237 |
-#endif /* CONFIG_NETWORK */ |
|
| 238 | 237 |
|
| 239 | 238 |
#if !HAVE_POLL_H |
| 240 | 239 |
int poll(struct pollfd *fds, nfds_t numfds, int timeout) |
| ... | ... |
@@ -304,3 +303,4 @@ int poll(struct pollfd *fds, nfds_t numfds, int timeout) |
| 304 | 304 |
return rc; |
| 305 | 305 |
} |
| 306 | 306 |
#endif /* HAVE_POLL_H */ |
| 307 |
+#endif /* CONFIG_NETWORK */ |
| ... | ... |
@@ -55,7 +55,6 @@ typedef int socklen_t; |
| 55 | 55 |
#define closesocket close |
| 56 | 56 |
#endif |
| 57 | 57 |
|
| 58 |
-#if CONFIG_FFSERVER |
|
| 59 | 58 |
#if !HAVE_POLL_H |
| 60 | 59 |
typedef unsigned long nfds_t; |
| 61 | 60 |
|
| ... | ... |
@@ -82,7 +81,6 @@ struct pollfd {
|
| 82 | 82 |
|
| 83 | 83 |
int poll(struct pollfd *fds, nfds_t numfds, int timeout); |
| 84 | 84 |
#endif /* HAVE_POLL_H */ |
| 85 |
-#endif /* CONFIG_FFSERVER */ |
|
| 86 | 85 |
#endif /* CONFIG_NETWORK */ |
| 87 | 86 |
|
| 88 | 87 |
#endif /* AVFORMAT_OS_SUPPORT_H */ |