diff mbox

[PATCHv5,1/2] linux-generic: move api version to c file

Message ID 1424183202-23602-2-git-send-email-maxim.uvarov@linaro.org
State Accepted
Commit f90e241030d335fcc9aed34cc6e61983bc525eb0
Headers show

Commit Message

Maxim Uvarov Feb. 17, 2015, 2:26 p.m. UTC
odp_version_api_str() in odp api defined as non static function and
there should be implementation in c file. Include required headers
so that str macro unrolls to correct version string.
https://bugs.linaro.org/show_bug.cgi?id=1194

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
---
 platform/linux-generic/Makefile.am           |  1 +
 platform/linux-generic/include/odp/version.h | 14 --------------
 platform/linux-generic/odp_version.c         | 12 ++++++++++++
 3 files changed, 13 insertions(+), 14 deletions(-)
 create mode 100644 platform/linux-generic/odp_version.c
diff mbox

Patch

diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index c24d59d..16adccc 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -161,4 +161,5 @@  __LIB__libodp_la_SOURCES = \
 			   odp_ticketlock.c \
 			   odp_time.c \
 			   odp_timer.c \
+			   odp_version.c \
 			   odp_weak.c
diff --git a/platform/linux-generic/include/odp/version.h b/platform/linux-generic/include/odp/version.h
index f29320a..c98cb30 100644
--- a/platform/linux-generic/include/odp/version.h
+++ b/platform/linux-generic/include/odp/version.h
@@ -18,20 +18,6 @@  extern "C" {
 #endif
 
 #include <odp/plat/version_types.h>
-
-/** @ingroup odp_ver_abt_log_dbg
- *  @{
- */
-
-static inline const char *odp_version_api_str(void)
-{
-	return ODP_VERSION_API_STR;
-}
-
-/**
- * @}
- */
-
 #include <odp/api/version.h>
 
 #ifdef __cplusplus
diff --git a/platform/linux-generic/odp_version.c b/platform/linux-generic/odp_version.c
new file mode 100644
index 0000000..b5219d4
--- /dev/null
+++ b/platform/linux-generic/odp_version.c
@@ -0,0 +1,12 @@ 
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+#include <odp/version.h>
+
+const char *odp_version_api_str(void)
+{
+	return ODP_VERSION_API_STR;
+}