[PATCH] Fix getting environment variables for sanitizers needs on FreeBSD

Dmitry Vyukov dvyukov at google.com
Tue Jul 8 03:25:01 PDT 2014


================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:354
@@ -343,4 +353,3 @@
   }
-  return 0;  // Not found.
-}
+  return NULL;  // Not found.
 #else
----------------
s/NULL/0/ here in elsewhere
we don't use NULL in sanitizer runtimes, it may not even be defined here


================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:356
@@ -346,5 +355,3 @@
 #else
-const char *GetEnv(const char *name) {
   return getenv(name);
 #endif
----------------
this won't work w/o include <stdlib.h> that you removed
replace it with #error "unsupported platform"

http://reviews.llvm.org/D4229






More information about the llvm-commits mailing list