diff options
author | Moonchild <moonchild@palemoon.org> | 2019-11-02 14:37:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-02 14:37:22 +0100 |
commit | 21b3f6247403c06f85e1f45d219f87549862198f (patch) | |
tree | 0038ae92f1cc7aaff0b55d6e5ac59efcc28bdf8f /js/src/vm | |
parent | ff881bdb6795e0f307b93919f98f454bedde4bb6 (diff) | |
parent | a9dc528a4a7b0aaad5308aff70963485ec3e9bec (diff) | |
download | UXP-21b3f6247403c06f85e1f45d219f87549862198f.tar UXP-21b3f6247403c06f85e1f45d219f87549862198f.tar.gz UXP-21b3f6247403c06f85e1f45d219f87549862198f.tar.lz UXP-21b3f6247403c06f85e1f45d219f87549862198f.tar.xz UXP-21b3f6247403c06f85e1f45d219f87549862198f.zip |
Merge pull request #1262 from athenian200/solaris-work
Support Modern Solaris
Diffstat (limited to 'js/src/vm')
-rw-r--r-- | js/src/vm/Time.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/js/src/vm/Time.cpp b/js/src/vm/Time.cpp index 87531c148..a9a5b7f0f 100644 --- a/js/src/vm/Time.cpp +++ b/js/src/vm/Time.cpp @@ -11,6 +11,10 @@ #include "mozilla/DebugOnly.h" #include "mozilla/MathAlgorithms.h" +#ifdef XP_SOLARIS +#define _REENTRANT 1 +#endif + #include <string.h> #include <time.h> @@ -30,6 +34,10 @@ #ifdef XP_UNIX +#ifdef _SVID_GETTOD /* Defined only on Solaris, see Solaris <sys/types.h> */ +extern int gettimeofday(struct timeval* tv); +#endif + #include <sys/time.h> #endif /* XP_UNIX */ @@ -42,7 +50,11 @@ PRMJ_Now() { struct timeval tv; +#ifdef _SVID_GETTOD /* Defined only on Solaris, see Solaris <sys/types.h> */ + gettimeofday(&tv); +#else gettimeofday(&tv, 0); +#endif /* _SVID_GETTOD */ return int64_t(tv.tv_sec) * PRMJ_USEC_PER_SEC + int64_t(tv.tv_usec); } |