gecko-dev/media/libvpx/mingw.patch

31 lines
931 B
Diff

diff --git a/media/libvpx/vpx/src/svc_encodeframe.c b/media/libvpx/vpx/src/svc_encodeframe.c
index 57d21dc..2514ad3 100644
--- a/media/libvpx/vpx/src/svc_encodeframe.c
+++ b/media/libvpx/vpx/src/svc_encodeframe.c
@@ -18,21 +18,23 @@
#include <stdlib.h>
#include <string.h>
#define VPX_DISABLE_CTRL_TYPECHECKS 1
#define VPX_CODEC_DISABLE_COMPAT 1
#include "vpx/svc_context.h"
#include "vpx/vp8cx.h"
#include "vpx/vpx_encoder.h"
-#if defined(__MINGW32__) && !defined(MINGW_HAS_SECURE_API)
+#ifdef __MINGW32__
#define strtok_r strtok_s
+#ifndef MINGW_HAS_SECURE_API
// proto from /usr/x86_64-w64-mingw32/include/sec_api/string_s.h
_CRTIMP char *__cdecl strtok_s(char *str, const char *delim, char **context);
-#endif
+#endif /* MINGW_HAS_SECURE_API */
+#endif /* __MINGW32__ */
#ifdef _MSC_VER
#define strdup _strdup
#define strtok_r strtok_s
#endif
#define SVC_REFERENCE_FRAMES 8
#define SUPERFRAME_SLOTS (8)