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

Squash: Bug fixed

This commit is contained in:
winlin 2022-02-16 11:34:05 +08:00
parent d78a4f25a6
commit 88c8a4f6c0
12 changed files with 72 additions and 33 deletions

View file

@ -64,8 +64,6 @@ void srs_build_features(stringstream& ss)
SRS_CHECK_FEATURE3(!string(region).empty(), "region", region, ss);
string source = srs_getenv("SRS_SOURCE");
SRS_CHECK_FEATURE3(!string(source).empty(), "source", source, ss);
string mgmt = srs_getenv("SRS_MGMT");
SRS_CHECK_FEATURE3(!string(mgmt).empty(), "mgmt", mgmt, ss);
int nn_vhosts = 0;
bool rtsp = false, forward = false, ingest = false, edge = false, hls = false, dvr = false, flv = false;

View file

@ -148,6 +148,7 @@
(type *)( (char *)__mptr - offsetof(type,member) );})
#endif
#if 0
#ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME
# ifdef HAVE___PROGNAME
extern char *__progname;
@ -181,9 +182,10 @@ prog_inv_sh_nm_from_file(char *f, char stripext)
}
# endif
#endif
#endif
#ifndef HAVE_ERR_H
#if 0
static inline void
errmsg(char doexit, int excode, char adderr, const char *fmt, ...)
{
@ -202,6 +204,7 @@ errmsg(char doexit, int excode, char adderr, const char *fmt, ...)
if (doexit)
exit(excode);
}
#endif
#ifndef HAVE_ERR
# define err(E, FMT...) errmsg(1, E, 1, FMT)
@ -221,10 +224,12 @@ errmsg(char doexit, int excode, char adderr, const char *fmt, ...)
#endif /* !HAVE_ERR_H */
#if 0
static inline __attribute__((const)) int is_power_of_2(unsigned long num)
{
return (num != 0 && ((num & (num - 1)) == 0));
}
#endif
#ifndef HAVE_LOFF_T
typedef int64_t loff_t;
@ -263,6 +268,7 @@ static inline int dirfd(DIR *d)
#define IUTF8 0040000
#endif
#if 0
/*
* MAXHOSTNAMELEN replacement
*/
@ -282,6 +288,7 @@ static inline size_t get_hostname_max(void)
#endif
return 64;
}
#endif
#ifndef HAVE_USLEEP
/*
@ -825,7 +832,7 @@ static int get_clock(uint32_t *clock_high, uint32_t *clock_low,
rewind(state_f);
len = fprintf(state_f,
"clock: %04x tv: %016lu %08lu adj: %08d\n",
clock_seq, last.tv_sec, last.tv_usec, adjustment);
clock_seq, last.tv_sec, (unsigned long)last.tv_usec, adjustment);
fflush(state_f);
if (ftruncate(state_fd, len) < 0) {
fprintf(state_f, " \n");