Separate gcc version for gcov 30/318330/1 accepted/tizen_unified_toolchain accepted/tizen/9.0/unified/20241030.235525 accepted/tizen/unified/20241004.041941 accepted/tizen/unified/toolchain/20241022.122627 accepted/tizen/unified/toolchain/20241022.123035 accepted/tizen/unified/x/20241006.082054 accepted/tizen/unified/x/asan/20241014.000413 tizen_9.0_m2_release
authorJihoon Jung <jh8801.jung@samsung.com>
Fri, 27 Sep 2024 02:12:38 +0000 (11:12 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Fri, 27 Sep 2024 02:13:35 +0000 (11:13 +0900)
Change-Id: Ia7c3b16f94c7a6561a0d62d5dd463e92dbcda720
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
src/daemon/mtp_daemon.c

index 49487975148008d5d8cb45fab5f3e3460dd8d6b2..8c2253810b8bd0936e81ea873fdbbec8e08c7cdb 100644 (file)
 #include "mtp_daemon_db.h"
 
 #if (BUILD_GCOV != 0)
+#if (defined(__GNUC__) \
+        && ((__GNUC__ == 11 && __GNUC_MINOR__ >= 1) || (__GNUC__ >= 12))) \
+        || (defined(__clang__) && (__clang_major__ >= 12))
+extern void __gcov_dump(void);
+extern void __gcov_reset(void);
+#define __gcov_flush() do { __gcov_dump(); __gcov_reset(); } while (0)
+#else
 extern void __gcov_flush(void);
 #endif
+#endif
 
 static mtp_context *_mtp_ctx = NULL;