Skip to content

Ubuntu20.04 compilation error ::gettimeofday #1780

Closed
@huanghe2015

Description

@huanghe2015

Description'

Please ensure that you maintain the markdown structure.

Please describe the issue you encountered here.
'
Make sure to maintain the markdown structure.

  1. SRS version: 3.0-b4
  2. The log for SRS is as follows:
make[1]: Entering directory "/home/ak88/Documents/srs-3.0-b4/trunk
Build the srs(simple rtmp server) over ST(state-threads)
make -f objs/Makefile srs
make[2]: Entering directory "/home/ak88/Documents/srs-3.0-b4/trunk
g++ -c -ansi -Wall -g -O0 \
          -Isrc/kernel -Isrc/core -Iobjs \
          -o objs/src/kernel/srs_kernel_utility.o src/kernel/srs_kernel_utility.cpp
src/kernel/srs_kernel_utility.cpp:128:43: error: invalid conversion from 'int (*)(timeval*, void*) throw ()' {aka 'int (*)(timeval*, void*)'} to '_srs_gettimeofday_t' {aka 'int (*)(timeval*, timezone*)'}' [-fpermissive]

128 | _srs_gettimeofday_t _srs_gettimeofday = ::gettimeofday;
| ~~^~~~~~~~~~~~
| |
| int ()(timeval, void*) throw () {aka int ()(timeval, void*)}

make[2]: *** [objs/Makefile:77: objs/src/kernel/srs_kernel_utility.o] Error 1
make[2]: Leaving directory '/home/ak88/Documents/srs-3.0-b4/trunk'
make[1]: *** [Makefile:75: server] Error 2
make[1]: Leaving directory '/home/ak88/Documents/srs-3.0-b4/trunk'
make: *** [Makefile:10: default] Error 2
1. The configuration of SRS is as follows (Config):
./configure --full --use-sys-ssl && make
**Replay**
> How to replay the bug?
  1. Ubuntu 20.04
  2. GCC 9.3.0

TRANS_BY_GPT3

Metadata

Metadata

Assignees

Labels

BugIt might be a bug.TransByAITranslated by AI/GPT.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions