summaryrefslogtreecommitdiffstats
path: root/contrib/jemalloc
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2016-12-25 15:05:59 +0000
committerdim <dim@FreeBSD.org>2016-12-25 15:05:59 +0000
commita961141e70a4e5651acdb48cc6ebe87018dc7c75 (patch)
tree8bb1c30273f2479af47203cfd172310dc645ee2c /contrib/jemalloc
parent7234d73f429f21888afdc6cf6426bba171cf26e7 (diff)
downloadFreeBSD-src-a961141e70a4e5651acdb48cc6ebe87018dc7c75.zip
FreeBSD-src-a961141e70a4e5651acdb48cc6ebe87018dc7c75.tar.gz
Merge r304542 from projects/clang390-import (this fix was obsoleted in
head by an update to jemalloc 4.3.1 in r308473): Temporarily fix "macro expansion producing 'defined' has undefined behavior" in jemalloc, by defining JEMALLOC_CLOCK_GETTIME in a portable manner.
Diffstat (limited to 'contrib/jemalloc')
-rw-r--r--contrib/jemalloc/include/jemalloc/internal/nstime.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/jemalloc/include/jemalloc/internal/nstime.h b/contrib/jemalloc/include/jemalloc/internal/nstime.h
index dc293b7..4d8ef7b 100644
--- a/contrib/jemalloc/include/jemalloc/internal/nstime.h
+++ b/contrib/jemalloc/include/jemalloc/internal/nstime.h
@@ -1,8 +1,11 @@
/******************************************************************************/
#ifdef JEMALLOC_H_TYPES
-#define JEMALLOC_CLOCK_GETTIME defined(_POSIX_MONOTONIC_CLOCK) \
- && _POSIX_MONOTONIC_CLOCK >= 0
+#if defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0
+#define JEMALLOC_CLOCK_GETTIME 1
+#else
+#define JEMALLOC_CLOCK_GETTIME 0
+#endif
typedef struct nstime_s nstime_t;
OpenPOWER on IntegriCloud