Skip to content

Commit

Permalink
Fix the recursively included issue for srs_core_time.hpp (ossrs#3159)
Browse files Browse the repository at this point in the history
* Update srs_core_time.hpp

In included file: main file cannot be included recursively when building a preambleclang(pp_including_mainfile_in_preamble)
srs_core.hpp(43, 10): Error occurred here

* Update srs_core_time.hpp

Reference to trunk/src/protocol/srs_protocol_http_stack.hpp
  (!defined(_MSC_VER) || _MSC_VER<1600) && !defined(__WINE__)
typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
  • Loading branch information
mingo-wu1 authored and winlinvip committed Nov 21, 2022
1 parent f4f9c70 commit 62ab1a1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions trunk/src/core/srs_core_time.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
#ifndef SRS_CORE_TIME_HPP
#define SRS_CORE_TIME_HPP

#include <srs_core.hpp>

// Time and duration unit, in us.
#if defined(_WIN32) && !defined(__MINGW32__) && (!defined(_MSC_VER) || _MSC_VER<1600) && !defined(__WINE__)
#include <BaseTsd.h>
typedef __int64 srs_utime_t;
#else
#include <stdint.h>
typedef int64_t srs_utime_t;
#endif

// The time unit in ms, for example 100 * SRS_UTIME_MILLISECONDS means 100ms.
#define SRS_UTIME_MILLISECONDS 1000
Expand Down

0 comments on commit 62ab1a1

Please sign in to comment.