[FFmpeg-devel] [PATCH] os_support: protect poll() related declarations only by HAVE_POLL_H

Ronald S. Bultje rsbultje
Fri Jan 28 17:59:26 CET 2011


Hi,

On Fri, Jan 28, 2011 at 11:57 AM, Mans Rullgard <mans at mansr.com> wrote:
> This should fix building on systems without poll(), broken
> by a8475bbdb64e638bd8161df9647876fd23f8a29a.
>
> Signed-off-by: Mans Rullgard <mans at mansr.com>
> ---
> ?libavformat/os_support.h | ? ?4 +---
> ?1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/libavformat/os_support.h b/libavformat/os_support.h
> index 5c9e81b..404d982 100644
> --- a/libavformat/os_support.h
> +++ b/libavformat/os_support.h
> @@ -54,8 +54,8 @@ typedef int socklen_t;
> ?#if !HAVE_CLOSESOCKET
> ?#define closesocket close
> ?#endif
> +#endif /* CONFIG_NETWORK */
>
> -#if CONFIG_FFSERVER
> ?#if !HAVE_POLL_H
> ?typedef unsigned long nfds_t;
>
> @@ -82,7 +82,5 @@ struct pollfd {
>
> ?int poll(struct pollfd *fds, nfds_t numfds, int timeout);
> ?#endif /* HAVE_POLL_H */
> -#endif /* CONFIG_FFSERVER */
> -#endif /* CONFIG_NETWORK */
>
> ?#endif /* AVFORMAT_OS_SUPPORT_H */
> --
> 1.7.3.5

That doesn't look right, poll should be under CONFIG_NETWORK. Are the
demuxers causing this problem not under CONFIG_NETWORK themselves?

Ronald



More information about the ffmpeg-devel mailing list