From 83ce78a0153dda5660e00289ee27b35b587d4983 Mon Sep 17 00:00:00 2001 From: "jinxue.cgh" Date: Mon, 15 Jun 2020 16:32:08 +0800 Subject: [PATCH] tfsfu: fix compile error for bind, and warning --- trunk/src/app/srs_app_config.cpp | 3 --- trunk/src/app/srs_app_hls.cpp | 3 --- trunk/src/protocol/srs_service_st.cpp | 4 ++-- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index c8677ee27..fea008bc4 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -1468,9 +1468,6 @@ srs_error_t SrsConfig::reload_conf(SrsConfig* conf) root = conf->root; conf->root = NULL; - // merge config. - std::vector::iterator it; - // never support reload: // daemon // diff --git a/trunk/src/app/srs_app_hls.cpp b/trunk/src/app/srs_app_hls.cpp index 337a8448d..65fefd0c4 100644 --- a/trunk/src/app/srs_app_hls.cpp +++ b/trunk/src/app/srs_app_hls.cpp @@ -759,9 +759,6 @@ srs_error_t SrsHlsMuxer::_refresh_m3u8(string m3u8_file) SrsHlsSegment* first = dynamic_cast(segments->first()); ss << "#EXT-X-MEDIA-SEQUENCE:" << first->sequence_no << SRS_CONSTS_LF; - // iterator shared for td generation and segemnts wrote. - std::vector::iterator it; - // #EXT-X-TARGETDURATION:4294967295\n /** * @see hls-m3u8-draft-pantos-http-live-streaming-12.pdf, page 25 diff --git a/trunk/src/protocol/srs_service_st.cpp b/trunk/src/protocol/srs_service_st.cpp index e7181cae4..d1558b2aa 100644 --- a/trunk/src/protocol/srs_service_st.cpp +++ b/trunk/src/protocol/srs_service_st.cpp @@ -214,7 +214,7 @@ srs_error_t do_srs_tcp_listen(int fd, addrinfo* r, srs_netfd_t* pfd) return srs_error_wrap(err, "set reuseport"); } - if (bind(fd, r->ai_addr, r->ai_addrlen) == -1) { + if (::bind(fd, r->ai_addr, r->ai_addrlen) == -1) { return srs_error_new(ERROR_SOCKET_BIND, "bind"); } @@ -279,7 +279,7 @@ srs_error_t do_srs_udp_listen(int fd, addrinfo* r, srs_netfd_t* pfd) return srs_error_wrap(err, "set reuseport"); } - if (bind(fd, r->ai_addr, r->ai_addrlen) == -1) { + if (::bind(fd, r->ai_addr, r->ai_addrlen) == -1) { return srs_error_new(ERROR_SOCKET_BIND, "bind"); }