From 90b92fe48ec72b6c15cce24d33ac983548368b98 Mon Sep 17 00:00:00 2001 From: Ratan Gupta Date: Fri, 5 May 2017 17:34:00 +0530 Subject: Make the code compatible with c++ compiler if we write "int i;" in header file, c compiler treats as a tentative definition while c++ compiler treats as a definition. so when two cpp file includes the same header file then during linking time compiler says that there are multiple definitions. so to overcome this problem we are declaring it as extern and defining it in the corresponding c file. Change-Id: I91378c4c587414edf35f8313f2497268be36e2f4 Signed-off-by: Ratan Gupta --- common.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common.c') diff --git a/common.c b/common.c index c9d5d85..b562cc9 100644 --- a/common.c +++ b/common.c @@ -26,6 +26,10 @@ #include "common.h" +void (*mbox_vlog)(int p, const char *fmt, va_list args); + +enum verbose verbosity; + void mbox_log_console(int p, const char *fmt, va_list args) { struct timespec time; -- cgit v1.2.1