winshining / nginx-http-flv-module

A media streaming server based on nginx-rtmp-module. In addtion to the features nginx-rtmp-module provides, HTTP-FLV, GOP cache, VHosts (one IP for multi domain names) and JSON style statistics are supported now.
BSD 2-Clause "Simplified" License
2.72k stars 567 forks source link

[bug]类型冲突 #172

Closed rsp4jack closed 4 years ago

rsp4jack commented 4 years ago

When you meet a bug, please open the issue including a title prefixed by '[bug]' and describe it as follows: 当你碰到一个bug,请在提出问题时以'[bug]'为前缀写明标题,并且像下面的内容一样描述它:

Expected behavior / 期望行为

编译成功

Actual behavior / 实际行为

cc -c -pipe  -O -W -Wno-unused-parameter -g -DFD_SETSIZE=1024  -I src/core -I src/event -I src/event/modules -I src/os/win32 -I objs/lib/nginx-http-flv-module -I objs/lib/pcre-8.44 -I objs/lib/openssl-1.1.1g/.openssl/include -I objs/lib/zlib-1.2.11 -I objs -I src/http -I src/http/modules -I src/http/v2 -I objs/lib/nginx-http-flv-module -I src/mail -I src/stream \
        -o objs/addon/nginx-http-flv-module/ngx_rtmp.o \
        objs/lib/nginx-http-flv-module/ngx_rtmp.c
In file included from objs/lib/nginx-http-flv-module/ngx_rtmp.c:12:
objs/lib/nginx-http-flv-module/ngx_rtmp.h:31:29: error: conflicting types for 'int8_t'
   31 | typedef __int8              int8_t;
      |                             ^~~~~~
In file included from E:/msys32/mingw32/lib/gcc/i686-w64-mingw32/9.3.0/include/stdint.h:9,
                 from src/os/win32/ngx_win32_config.h:62,
                 from src/core/ngx_config.h:38,
                 from objs/lib/nginx-http-flv-module/ngx_rtmp.c:8:
E:/msys32/mingw32/i686-w64-mingw32/include/stdint.h:35:21: note: previous declaration of 'int8_t' was here
   35 | typedef signed char int8_t;
      |                     ^~~~~~
make[1]: *** [objs/Makefile:1867:objs/addon/nginx-http-flv-module/ngx_rtmp.o] 错误 1
make[1]: 离开目录“/home/Creepercdn/nginx”
make: *** [Makefile:8:build] 错误 2

编译出错

OS and Nginx version / 操作系统和Nginx版本号

OS: msys2 MINGW32_NT-10.0-19041-WOW64 3.0.7-338.i686 i686 Nginx: 不知道

Configuration file / 配置文件

Steps to reproduce the behavior / 复现问题步骤

编译这个模块为静态模块在nginx上

rsp4jack commented 4 years ago
objs/lib/nginx-http-flv-module/ngx_rtmp.h:31:29: error: conflicting types for 'int8_t'
   31 | typedef __int8              int8_t;
      |                             ^~~~~~

我需要把这一行代码删掉吗?

winshining commented 4 years ago

在Windows平台上请使用Visual Studio 2010及其以上的IDE编译