You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
626 B

  1. --- a/osdep/OSUtils.hpp
  2. +++ b/osdep/OSUtils.hpp
  3. @@ -37,9 +37,6 @@
  4. #include <sys/time.h>
  5. #include <sys/stat.h>
  6. #include <arpa/inet.h>
  7. -#ifdef __LINUX__
  8. -#include <sys/syscall.h>
  9. -#endif
  10. #endif
  11. #ifndef OMIT_JSON_SUPPORT
  12. @@ -211,11 +208,8 @@ public:
  13. return (int64_t)( ((tmp.QuadPart - 116444736000000000LL) / 10000L) + st.wMilliseconds );
  14. #else
  15. struct timeval tv;
  16. -#ifdef __LINUX__
  17. - syscall(SYS_gettimeofday,&tv,0); /* fix for musl libc broken gettimeofday bug */
  18. -#else
  19. gettimeofday(&tv,(struct timezone *)0);
  20. -#endif
  21. +
  22. return ( (1000LL * (int64_t)tv.tv_sec) + (int64_t)(tv.tv_usec / 1000) );
  23. #endif
  24. };