summaryrefslogtreecommitdiff
path: root/src/common/compat.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-02-23 14:05:54 -0500
committerNick Mathewson <nickm@torproject.org>2016-02-23 14:05:54 -0500
commita7f303a4818b551b4a59a3624cc337294a2703e3 (patch)
treeaae3842292ae27e898f21f5d0b207d93dee99fae /src/common/compat.h
parent94c8f3605f39a8a9058e7c0222386f3dd8dbfa7c (diff)
parent67e5d49d8a995c6d3b8bf4177046271a7d4dd157 (diff)
downloadtor-a7f303a4818b551b4a59a3624cc337294a2703e3.tar.gz
tor-a7f303a4818b551b4a59a3624cc337294a2703e3.zip
Merge branch 'maint-0.2.7'
Diffstat (limited to 'src/common/compat.h')
-rw-r--r--src/common/compat.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/compat.h b/src/common/compat.h
index 8f35dfd110..c5df4dc20c 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -42,6 +42,15 @@
#include <netinet6/in6.h>
#endif
+#if defined(__has_feature)
+# if __has_feature(address_sanitizer)
+/* Some of the fancy glibc strcmp() macros include references to memory that
+ * clang rejects because it is off the end of a less-than-3. Clang hates this,
+ * even though those references never actually happen. */
+# undef strcmp
+# endif
+#endif
+
#include <stdio.h>
#include <errno.h>