Fix warnings for uuid. v4.0.245

pull/2921/head v4.0-b9
winlin 3 years ago
parent 37b6b48882
commit b94ae922d4

@ -8,6 +8,7 @@ The changelog for SRS.
## SRS 4.0 Changelog ## SRS 4.0 Changelog
* v4.0, 2022-02-15, Fix warnings for uuid. v4.0.245
* v4.0, 2022-02-15, Merge [#2917](https://github.com/ossrs/srs/pull/2917): SRT: Close connection if RTMP failed. (#2917). v4.0.244 * v4.0, 2022-02-15, Merge [#2917](https://github.com/ossrs/srs/pull/2917): SRT: Close connection if RTMP failed. (#2917). v4.0.244
* v4.0, 2022-02-15, Refine build script for SRT to avoid warnings. v4.0.243 * v4.0, 2022-02-15, Refine build script for SRT to avoid warnings. v4.0.243
* v4.0, 2022-02-11, Support new fields for feature query. v4.0.241 * v4.0, 2022-02-11, Support new fields for feature query. v4.0.241

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

@ -9,6 +9,6 @@
#define VERSION_MAJOR 4 #define VERSION_MAJOR 4
#define VERSION_MINOR 0 #define VERSION_MINOR 0
#define VERSION_REVISION 244 #define VERSION_REVISION 245
#endif #endif

Loading…
Cancel
Save