>From e93277acd457eb1f08037b28e670f3263b037307 Mon Sep 17 00:00:00 2001 From: KO Myung-Hun Date: Mon, 7 Sep 2015 15:56:42 +0900 Subject: [PATCH] stream_filter: fix compilation on OS/2 On OS/2, mmap() is wrongly declared in stdio.h, too. Prevent it. ----- CC stream_filter/prefetch.lo stream_filter/prefetch.c:40:7: error: expected identifier or '(' before 'void' ((void)(a), (void)(l), (void)(d), (void)(o), errno = ENOMEM, MAP_FAILED) ^ stream_filter/prefetch.c:40:12: error: expected ')' before '(' token ((void)(a), (void)(l), (void)(d), (void)(o), errno = ENOMEM, MAP_FAILED) ^ stream_filter/prefetch.c: In function 'Open': stream_filter/prefetch.c:42:42: warning: right-hand operand of comma expression has no effect [-Wunused-value] ((void)(a), (void)(l), errno = EINVAL, -1) ^ stream_filter/prefetch.c:575:9: note: in expansion of macro 'munmap' munmap(sys->buffer, 2 * sys->buffer_size); ^ stream_filter/prefetch.c: In function 'Close': stream_filter/prefetch.c:42:42: warning: right-hand operand of comma expression has no effect [-Wunused-value] ((void)(a), (void)(l), errno = EINVAL, -1) ^ stream_filter/prefetch.c:605:5: note: in expansion of macro 'munmap' munmap(sys->buffer, 2 * sys->buffer_size); ^ ----- --- include/vlc_fixups.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h index 305de87..c2c4c62 100644 --- a/include/vlc_fixups.h +++ b/include/vlc_fixups.h @@ -381,6 +381,12 @@ struct addrinfo }; void freeaddrinfo (struct addrinfo *res); + +# ifndef _MMAP_DECLARED +/* Prevent mmap() declaration in stdio.h on OS/2 */ +# define _MMAP_DECLARED +# endif + #endif /* math.h */ -- 1.9.5