]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: use __SANITIZE_ADDRESS__ rather than custom USE_CLOSE_ATEXIT
authorKarel Zak <kzak@redhat.com>
Tue, 7 May 2019 10:59:52 +0000 (12:59 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 7 May 2019 10:59:52 +0000 (12:59 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac
include/closestream.h

index 93303469c2b51087fb37374c9221307444258f9f..c314edd650fafea93cc71d8c73ffb21bb30ab848 100644 (file)
@@ -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
index 0ce34fe52dc287948a5e2883a8b7590faee23be1..6a62e48e8a13522aaf9f8a60ad8acbca77afbce8 100644 (file)
@@ -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
 }