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

For #2532: Windows: Support CYGWIN64 for SRS (#3255)

1. Support cygwin by '--cygwin64=on'
2. Detect cygwin automatically.
3. Disalbe sanitizer, srt and srtp with openssl.
4. Disable multiple threads, use single threads.
5. Support utest for cygwin64.
6. Query features for windows by API.
7. Disable stat APIs for cygwin.
8. Use ST select event driver.

Co-authored-by: wenjie.zhao <740936897@qq.com>
This commit is contained in:
Winlin 2022-11-20 12:29:57 +08:00 committed by GitHub
parent 3d0dcb2a17
commit d741f81110
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 122 additions and 30 deletions

View file

@ -48,9 +48,15 @@ srs_error_t srs_st_init()
// Select the best event system available on the OS. In Linux this is
// epoll(). On BSD it will be kqueue.
#if defined(SRS_CYGWIN64)
if (st_set_eventsys(ST_EVENTSYS_SELECT) == -1) {
return srs_error_new(ERROR_ST_SET_SELECT, "st enable st failed, current is %s", st_get_eventsys_name());
}
#else
if (st_set_eventsys(ST_EVENTSYS_ALT) == -1) {
return srs_error_new(ERROR_ST_SET_EPOLL, "st enable st failed, current is %s", st_get_eventsys_name());
}
#endif
// Before ST init, we might have already initialized the background cid.
SrsContextId cid = _srs_context->get_id();