1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Merge SRS3

This commit is contained in:
winlin 2020-09-10 19:36:55 +08:00
commit 0cadbca52f
3 changed files with 3 additions and 7 deletions

View file

@ -124,12 +124,7 @@ srs_error_t srs_fd_reuseport(int fd)
#if defined(SO_REUSEPORT)
int v = 1;
if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &v, sizeof(int)) == -1) {
#ifdef SRS_CROSSBUILD
srs_warn("SO_REUSEPORT disabled for crossbuild");
return srs_success;
#else
return srs_error_new(ERROR_SOCKET_SETREUSEADDR, "SO_REUSEPORT fd=%d", fd);
#endif
srs_warn("SO_REUSEPORT failed for fd=%d", fd);
}
#else
#warning "SO_REUSEPORT is not supported by your OS"