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

Fix #1547, support crossbuild for ARM/MIPS.

This commit is contained in:
winlin 2020-01-21 13:59:43 +08:00
parent 6af8e38017
commit 0df108740a
6 changed files with 73 additions and 30 deletions

View file

@ -115,7 +115,12 @@ 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) {
return srs_error_new(ERROR_SOCKET_SETREUSEADDR, "SO_REUSEPORT fd=%v", fd);
#ifdef SRS_AUTO_CROSSBUILD
srs_warn("SO_REUSEPORT disabled for crossbuild");
return srs_success;
#else
return srs_error_new(ERROR_SOCKET_SETREUSEADDR, "SO_REUSEPORT fd=%v", fd);
#endif
}
#else
#warning "SO_REUSEPORT is not supported by your OS"