diff mbox series

[FFmpeg-devel,2/2] libavutil: x86: Include stdlib.h before using _byteswap_ulong

Message ID 20200121202447.12496-2-martin@martin.st
State New
Headers show
Series [FFmpeg-devel,1/2] configure: Check for GetStdHandle in addition to SetConsoleTextAttribute
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Martin Storsjö Jan. 21, 2020, 8:24 p.m. UTC
When clang works in MSVC mode, it does have the _byteswap_ulong
builtin, but one has to include stdlib.h before using it.
---
 libavutil/x86/bswap.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Martin Storsjö Jan. 23, 2020, 4:16 p.m. UTC | #1
On Tue, 21 Jan 2020, Martin Storsjö wrote:

> When clang works in MSVC mode, it does have the _byteswap_ulong
> builtin, but one has to include stdlib.h before using it.
> ---
> libavutil/x86/bswap.h | 1 +
> 1 file changed, 1 insertion(+)

I'll go ahead and push these two, as they're quite uncontroversial.

// Martin
diff mbox series

Patch

diff --git a/libavutil/x86/bswap.h b/libavutil/x86/bswap.h
index ffa59e4c82..b2f18b6c93 100644
--- a/libavutil/x86/bswap.h
+++ b/libavutil/x86/bswap.h
@@ -26,6 +26,7 @@ 
 
 #include <stdint.h>
 #if defined(_MSC_VER)
+#include <stdlib.h>
 #include <intrin.h>
 #endif
 #include "config.h"