Bug 1271590 - Rename timespecadd to moz_timespecadd. r=jandem

NetBSD provides a timespecadd macro in sys/time.h, which conflicts with this one.
This commit is contained in:
Thomas Klausner 2016-05-10 05:27:00 -04:00
Родитель 7ee391a98f
Коммит 39e17aa33c
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -37,7 +37,7 @@ static const clockid_t WhichClock = CLOCK_MONOTONIC;
// timespec structure is largely lacking such conveniences. Thankfully, the
// utilities available in MFBT make implementing our own quite easy.
static void
timespecadd(struct timespec* lhs, struct timespec* rhs, struct timespec* result)
moz_timespecadd(struct timespec* lhs, struct timespec* rhs, struct timespec* result)
{
// Add nanoseconds. This may wrap, but not above 2 billion.
MOZ_RELEASE_ASSERT(lhs->tv_nsec < NanoSecPerSec);
@ -149,7 +149,7 @@ js::ConditionVariable::wait_for(UniqueLock<Mutex>& lock,
MOZ_RELEASE_ASSERT(!r);
struct timespec abs_ts;
timespecadd(&now_ts, &rel_ts, &abs_ts);
moz_timespecadd(&now_ts, &rel_ts, &abs_ts);
r = pthread_cond_timedwait(ptCond, ptMutex, &abs_ts);
#else