From: Karel Zak Date: Tue, 7 May 2019 10:59:52 +0000 (+0200) Subject: build-sys: use __SANITIZE_ADDRESS__ rather than custom USE_CLOSE_ATEXIT X-Git-Tag: v2.34-rc2~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=084365f1a1ebed26f2a15e5fc57230a3d7bcdad7;p=thirdparty%2Futil-linux.git build-sys: use __SANITIZE_ADDRESS__ rather than custom USE_CLOSE_ATEXIT Signed-off-by: Karel Zak --- diff --git a/configure.ac b/configure.ac index 93303469c2..c314edd650 100644 --- a/configure.ac +++ b/configure.ac @@ -156,10 +156,7 @@ AC_ARG_ENABLE([asan], AS_IF([test "x$enable_asan" = xyes], [ UL_WARN_ADD([-fsanitize=address]) ASAN_LDFLAGS="-fsanitize=address" -],[ - AC_DEFINE([USE_CLOSE_ATEXIT], [1], [close stdout at exit]) ]) - AC_SUBST([ASAN_LDFLAGS]) dnl libtool-2 diff --git a/include/closestream.h b/include/closestream.h index 0ce34fe52d..6a62e48e8a 100644 --- a/include/closestream.h +++ b/include/closestream.h @@ -57,7 +57,7 @@ close_stdout_atexit(void) /* * Note that close stdout at exit disables ASAN to report memory leaks */ -#ifdef USE_CLOSE_ATEXIT +#if !defined(__SANITIZE_ADDRESS__) atexit(close_stdout); #endif }