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 (#3808)

This commit is contained in:
winlin 2023-09-21 22:31:38 +08:00
parent 389a62ee3a
commit 632d457194
154 changed files with 39813 additions and 17038 deletions

View file

@ -14,15 +14,15 @@ written by
Haivision Systems Inc.
*****************************************************************************/
#ifndef HAISRT_COMPAT_H__
#define HAISRT_COMPAT_H__
#ifndef INC_SRT_COMPAT_H
#define INC_SRT_COMPAT_H
#include <stddef.h>
#include <time.h>
#ifndef SRT_API
#ifdef _WIN32
#ifndef __MINGW__
#ifndef __MINGW32__
#ifdef SRT_DYNAMIC
#ifdef SRT_EXPORTS
#define SRT_API __declspec(dllexport)
@ -78,6 +78,7 @@ SRT_API const char * SysStrError(int errnum, char * buf, size_t buflen);
#include <string>
#include <cstring>
inline std::string SysStrError(int errnum)
{
char buf[1024];
@ -93,7 +94,10 @@ inline struct tm SysLocalTime(time_t tt)
if (rr == 0)
return tms;
#else
tms = *localtime_r(&tt, &tms);
// Ignore the error, state that if something
// happened, you simply have a pre-cleared tms.
localtime_r(&tt, &tms);
#endif
return tms;
@ -102,4 +106,4 @@ inline struct tm SysLocalTime(time_t tt)
#endif // defined C++
#endif // HAISRT_COMPAT_H__
#endif // INC_SRT_COMPAT_H