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

Måns Rullgård mans
Fri Jan 28 18:02:43 CET 2011


"Ronald S. Bultje" <rsbultje at gmail.com> writes:

> 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?

The poll() emulation isn't under CONFIG_NETWORK.  I assumed that was
for a reason.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list