修复 Linux Mingw 构建
diff --git a/ngx_rtmp.h b/ngx_rtmp.h index cbe6a93..03160b4 100644 --- a/ngx_rtmp.h +++ b/ngx_rtmp.h @@ -18,7 +18,7 @@ #include "ngx_rtmp_bandwidth.h"
-#if (NGX_WIN32) +#if (NGX_WIN32) && defined(_MSC_VER) typedef __int8 int8_t; typedef unsigned __int8 uint8_t; #endif @@ -182,7 +182,7 @@ typedef struct {
/* disable zero-sized array warning by msvc */
-#if (NGX_WIN32) +#if (NGX_WIN32) && defined(_MSC_VER) #pragma warning(push) #pragma warning(disable:4200) #endif @@ -271,7 +271,7 @@ typedef struct { } ngx_rtmp_session_t;
-#if (NGX_WIN32) +#if (NGX_WIN32) && defined(_MSC_VER) #pragma warning(pop) #endif
diff --git a/ngx_rtmp_mp4_module.c b/ngx_rtmp_mp4_module.c index 0259ca2..d6922f0 100644 --- a/ngx_rtmp_mp4_module.c +++ b/ngx_rtmp_mp4_module.c @@ -32,7 +32,7 @@ static ngx_int_t ngx_rtmp_mp4_reset(ngx_rtmp_session_t *s);
/* disable zero-sized array warning by msvc */
-#if (NGX_WIN32) +#if (NGX_WIN32) && defined(_MSC_VER) #pragma warning(push) #pragma warning(disable:4200) #endif @@ -115,7 +115,7 @@ typedef struct { } ngx_rtmp_mp4_offsets64_t;
-#if (NGX_WIN32) +#if (NGX_WIN32) && defined(_MSC_VER) #pragma warning(pop) #endif
内容来源: arut/nginx-rtmp-module