From 078d8c0c9c95af75e6de1ec5c30ed822f9f16c4f Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Fri, 27 Sep 2024 17:14:43 +0900 Subject: [PATCH] Replace __gcov_flush by __gcov_dump and __gcov_reset Change-Id: Id841fa7360ff9c773dd4eeb529d9330cdda2b2d1 --- packaging/download-provider.spec | 2 +- provider/download-provider-main.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packaging/download-provider.spec b/packaging/download-provider.spec index cd036a9..2d26e7e 100755 --- a/packaging/download-provider.spec +++ b/packaging/download-provider.spec @@ -1,6 +1,6 @@ Name: download-provider Summary: Download the contents in background -Version: 2.4.1 +Version: 2.4.2 Release: 0 Group: Development/Libraries License: Apache-2.0 diff --git a/provider/download-provider-main.c b/provider/download-provider-main.c index 1a2c14e..e736b47 100755 --- a/provider/download-provider-main.c +++ b/provider/download-provider-main.c @@ -33,7 +33,15 @@ pthread_t g_client_manager_tid; void *dp_client_manager(void *arg); #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 int main(int argc, char **argv) -- 2.7.4