mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine RTC, disable NASM, SENDMMSG, SRTP-NASM
This commit is contained in:
parent
32c4febafe
commit
2a0562da5e
12 changed files with 44 additions and 82 deletions
10
trunk/3rdparty/st-srs/io.c
vendored
10
trunk/3rdparty/st-srs/io.c
vendored
|
@ -743,16 +743,18 @@ int st_sendmsg(_st_netfd_t *fd, const struct msghdr *msg, int flags, st_utime_t
|
|||
}
|
||||
|
||||
|
||||
#if defined(MD_HAVE_SENDMMSG) && defined(__linux__) && defined(_GNU_SOURCE)
|
||||
int st_sendmmsg(st_netfd_t fd, struct mmsghdr *msgvec, unsigned int vlen, int flags, st_utime_t timeout)
|
||||
int st_sendmmsg(st_netfd_t fd, void *msgvec, unsigned int vlen, int flags, st_utime_t timeout)
|
||||
{
|
||||
#if !defined(MD_HAVE_SENDMMSG) || !defined(_GNU_SOURCE)
|
||||
return -1;
|
||||
#else
|
||||
int n;
|
||||
int left;
|
||||
struct mmsghdr *p;
|
||||
|
||||
left = (int)vlen;
|
||||
while (left > 0) {
|
||||
p = msgvec + (vlen - left);
|
||||
p = (struct mmsghdr*)msgvec + (vlen - left);
|
||||
|
||||
if ((n = sendmmsg(fd->osfd, p, left, flags)) < 0) {
|
||||
if (errno == EINTR)
|
||||
|
@ -772,8 +774,8 @@ int st_sendmmsg(st_netfd_t fd, struct mmsghdr *msgvec, unsigned int vlen, int fl
|
|||
return n;
|
||||
}
|
||||
return (int)vlen - left;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue