mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
SRT: Upgrade libsrt from 1.4.1 to 1.5.1. v6.0.12 (#3362)
Co-authored-by: winlin <winlin@vip.126.com>
This commit is contained in:
parent
7a56208f2f
commit
fe086dfc31
143 changed files with 38185 additions and 15108 deletions
14
trunk/3rdparty/srt-1-fit/srtcore/srt_compat.h
vendored
14
trunk/3rdparty/srt-1-fit/srtcore/srt_compat.h
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue