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

Upgrade libsrt to v1.5.3. v5.0.183 v6.0.81 (#3808)

fix https://github.com/ossrs/srs/issues/3155
Build srt-1-fit fails with `standard attributes in middle of
decl-specifiers` on GCC 12,Arch Linux.

See https://github.com/Haivision/srt/releases/tag/v1.5.3
This commit is contained in:
Haibo Chen 2023-09-21 22:23:56 +08:00 committed by GitHub
parent f9bba0a9b0
commit c5e067fb0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
94 changed files with 5974 additions and 6273 deletions

View file

@ -66,6 +66,7 @@ modified by
#include "epoll.h"
#include "logging.h"
#include "udt.h"
#include "utilities.h"
using namespace std;
using namespace srt::sync;
@ -214,8 +215,8 @@ void srt::CEPoll::clear_ready_usocks(CEPollDesc& d, int direction)
}
}
for (size_t i = 0; i < cleared.size(); ++i)
d.removeSubscription(cleared[i]);
for (size_t j = 0; j < cleared.size(); ++j)
d.removeSubscription(cleared[j]);
}
int srt::CEPoll::add_ssock(const int eid, const SYSSOCKET& s, const int* events)
@ -639,8 +640,8 @@ int srt::CEPoll::wait(const int eid, set<SRTSOCKET>* readfds, set<SRTSOCKET>* wr
#ifdef LINUX
const int max_events = ed.m_sLocals.size();
SRT_ASSERT(max_events > 0);
epoll_event ev[max_events];
int nfds = ::epoll_wait(ed.m_iLocalID, ev, max_events, 0);
srt::FixedArray<epoll_event> ev(max_events);
int nfds = ::epoll_wait(ed.m_iLocalID, ev.data(), ev.size(), 0);
IF_HEAVY_LOGGING(const int prev_total = total);
for (int i = 0; i < nfds; ++ i)
@ -660,23 +661,23 @@ int srt::CEPoll::wait(const int eid, set<SRTSOCKET>* readfds, set<SRTSOCKET>* wr
#elif defined(BSD) || TARGET_OS_MAC
struct timespec tmout = {0, 0};
const int max_events = ed.m_sLocals.size();
const int max_events = (int)ed.m_sLocals.size();
SRT_ASSERT(max_events > 0);
struct kevent ke[max_events];
srt::FixedArray<struct kevent> ke(max_events);
int nfds = kevent(ed.m_iLocalID, NULL, 0, ke, max_events, &tmout);
int nfds = kevent(ed.m_iLocalID, NULL, 0, ke.data(), (int)ke.size(), &tmout);
IF_HEAVY_LOGGING(const int prev_total = total);
for (int i = 0; i < nfds; ++ i)
{
if ((NULL != lrfds) && (ke[i].filter == EVFILT_READ))
{
lrfds->insert(ke[i].ident);
lrfds->insert((int)ke[i].ident);
++ total;
}
if ((NULL != lwfds) && (ke[i].filter == EVFILT_WRITE))
{
lwfds->insert(ke[i].ident);
lwfds->insert((int)ke[i].ident);
++ total;
}
}
@ -702,7 +703,7 @@ int srt::CEPoll::wait(const int eid, set<SRTSOCKET>* readfds, set<SRTSOCKET>* wr
if (lwfds)
FD_SET(*i, &rqwritefds);
if ((int)*i > max_fd)
max_fd = *i;
max_fd = (int)*i;
}
IF_HEAVY_LOGGING(const int prev_total = total);