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 <ratagupt@in.ibm.com>
diff --git a/common.h b/common.h
index 581cd0c..83ead0c 100644
--- a/common.h
+++ b/common.h
@@ -25,11 +25,13 @@
 #define PREFIX ""
 #endif
 
-enum {
+enum verbose {
    MBOX_LOG_NONE = 0,
    MBOX_LOG_INFO = 1,
    MBOX_LOG_DEBUG = 2
-} verbosity;
+};
+
+extern enum verbose verbosity;
 
 /* Error Messages */
 #define MSG_ERR(f_, ...)	mbox_log(LOG_ERR, f_, ##__VA_ARGS__)
@@ -42,7 +44,7 @@
 					mbox_log(LOG_DEBUG, f_, ##__VA_ARGS__); \
 				} } while(0)
 
-void (*mbox_vlog)(int p, const char *fmt, va_list args);
+extern void (*mbox_vlog)(int p, const char *fmt, va_list args);
 
 void mbox_log_console(int p, const char *fmt, va_list args);