This problem is met during build as ASAN.
Add global variable '_rdp_log_dom' to extern keyword.
The global variable in a header file, then this definition
will go to every c file that includes this header, and
will get multiple define error.
Error log :
[ 79s] /usr/lib/gcc/armv7l-tizen-linux-gnueabi/9.2.0/../../../../armv7l-tizen-linux-gnueabi/bin/ld: .libs/module_la-e_mod_rdp.o:/home/abuild/rpmbuild/BUILD/e-mod-tizen-rdp-0.1.2/src/e_mod_rdp.h:26: multiple definition of `_rdp_log_dom'; .libs/module_la-e_mod_main.o:/home/abuild/rpmbuild/BUILD/e-mod-tizen-rdp-0.1.2/src/e_mod_rdp.h:26: first defined here
[ 79s] /usr/lib/gcc/armv7l-tizen-linux-gnueabi/9.2.0/../../../../armv7l-tizen-linux-gnueabi/bin/ld: .libs/module_la-e_mod_rdp_conf.o:(.bss.__odr_asan._rdp_log_dom+0x0): multiple definition of `__odr_asan._rdp_log_dom'; .libs/module_la-e_mod_main.o:(.bss.__odr_asan._rdp_log_dom+0x0): first defined here
Change-Id: Iee56a971302625818745e390e4235f12f80cb5b6
Signed-off-by: Seungha Son <seungha.son@samsung.com>
* safely) */
EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "RDP-Module" };
+int _rdp_log_dom = -1;
const static char *_rdp_log_dom_name = "e-rdp";
EAPI void *
# undef CRI
#endif
-int _rdp_log_dom;
+extern int _rdp_log_dom;
#define DBG(...) EINA_LOG_DOM_DBG(_rdp_log_dom, __VA_ARGS__)
#define INF(...) EINA_LOG_DOM_INFO(_rdp_log_dom, __VA_ARGS__)
#define WRN(...) EINA_LOG_DOM_WARN(_rdp_log_dom, __VA_ARGS__)