From bb26d92a34dbffd2cf2476273255c7fbe1191517 Mon Sep 17 00:00:00 2001 From: Jeesun Kim Date: Mon, 19 Dec 2016 14:51:52 +0900 Subject: [PATCH] Add __attribute__ ((gnu_inline)) to fix undefined reference to inline function Change-Id: I2b5cf39b8583c20320de173793066d3851569e52 --- client/ctsvc_client_utils.c | 4 ++-- client/ctsvc_client_utils.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/ctsvc_client_utils.c b/client/ctsvc_client_utils.c index 561adc8..8f871f9 100644 --- a/client/ctsvc_client_utils.c +++ b/client/ctsvc_client_utils.c @@ -27,12 +27,12 @@ #define CTSVC_SYSTEM_SLICE "system.slice" -inline unsigned int ctsvc_client_get_pid() +__attribute__ ((gnu_inline))inline unsigned int ctsvc_client_get_pid() { return (unsigned int)getpid(); } -inline unsigned int ctsvc_client_get_tid() +__attribute__ ((gnu_inline))inline unsigned int ctsvc_client_get_tid() { return (unsigned int)syscall(SYS_gettid); } diff --git a/client/ctsvc_client_utils.h b/client/ctsvc_client_utils.h index b8861f0..239ffeb 100644 --- a/client/ctsvc_client_utils.h +++ b/client/ctsvc_client_utils.h @@ -20,8 +20,8 @@ #ifndef __CTSVC_CLIENT_UTILS_H__ #define __CTSVC_CLIENT_UTILS_H__ -unsigned int ctsvc_client_get_pid(); -unsigned int ctsvc_client_get_tid(); +__attribute__ ((gnu_inline))unsigned int ctsvc_client_get_pid(); +__attribute__ ((gnu_inline))unsigned int ctsvc_client_get_tid(); bool ctsvc_client_is_in_system_session(); int ctsvc_client_get_active_uid(uid_t *uid); -- 2.7.4