Skip to content

Commit

Permalink
Windows: Fix build failed.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Nov 18, 2022
1 parent 85d47f6 commit d02c469
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trunk/src/app/srs_app_threads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ using namespace std;
#include <unistd.h>
#include <fcntl.h>

#ifdef SRS_OSX
#if defined(SRS_OSX) || defined(SRS_CYGWIN64)
pid_t gettid() {
return 0;
}
Expand All @@ -49,7 +49,7 @@ using namespace std;

// These functions first appeared in glibc in version 2.12.
// See https://man7.org/linux/man-pages/man3/pthread_setname_np.3.html
#if defined(SRS_CROSSBUILD) && ((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12))
#if defined(SRS_CYGWIN64) || (defined(SRS_CROSSBUILD) && ((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)))
void pthread_setname_np(pthread_t trd, const char* name) {
}
#endif
Expand Down
6 changes: 6 additions & 0 deletions trunk/src/app/srs_app_uuid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

#include <srs_app_uuid.hpp>

#if defined(SRS_CYGWIN64)
#define HAVE_LOFF_T
#endif

#include <unistd.h>
#include <stdio.h>
#include <sys/file.h>
Expand Down Expand Up @@ -1082,7 +1086,9 @@ void uuid_generate(uuid_t out)
#include <string.h>
#include <sys/time.h>

#if defined(__linux__) && defined(HAVE_SYS_SYSCALL_H)
#include <sys/syscall.h>
#endif

//#include "randutils.h"

Expand Down

0 comments on commit d02c469

Please sign in to comment.