Move variable definition to c file 20/71420/1
authorSlava Barinov <v.barinov@samsung.com>
Wed, 25 May 2016 09:30:07 +0000 (12:30 +0300)
committerSlava Barinov <v.barinov@samsung.com>
Wed, 25 May 2016 09:31:42 +0000 (12:31 +0300)
This prevents multiple definition of `gdbus_nfc_context' error when building
with -fno-common flag used for Address Sanitizer.

Change-Id: I3e3bc66afaea4bda534874206a62803461741351
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
include/nfc_common.h
src/nfc_common.c

index 7090317..f592d1e 100644 (file)
@@ -144,7 +144,7 @@ typedef struct {
 }
 _nfc_context_s;
 
-_nfc_context_s gdbus_nfc_context;
+extern _nfc_context_s gdbus_nfc_context;
 
 pid_t nfc_common_get_focus_app_pid();
 char * nfc_common_get_bt_address_string(data_h data);
index 3a8a0af..3b47378 100755 (executable)
@@ -16,6 +16,8 @@
 
 #include "nfc_common.h"
 
+_nfc_context_s gdbus_nfc_context;
+
 /* LCOV_EXCL_START */
 pid_t nfc_common_get_focus_app_pid()
 {