[FFmpeg-devel] [PATCH] avcodec/nvenc: disable on cygwin to avoid _WIN32 definition hack
James Almer
jamrial at gmail.com
Thu Dec 11 03:08:43 CET 2014
On 10/12/14 10:42 PM, Michael Niedermayer wrote:
> Suggested-by: jamrial
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
> libavcodec/nvenc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
> index dc14594..7e5e34e 100644
> --- a/libavcodec/nvenc.c
> +++ b/libavcodec/nvenc.c
> @@ -27,6 +27,7 @@
>
> /* NVENC API is stdcall in cygwin, as it's still Windows */
> #if defined(__CYGWIN__) && !defined(_WIN32)
> +#error CYGWIN is not supported
> #define _WIN32
> #define TEMP_WIN32
> #endif
>
A configure check for $target_os = cygwin or similar when checking if the
header is available is probably a better idea.
Allowing configure to succeed when compilation is known to fail is not a
good practice.
More information about the ffmpeg-devel
mailing list