summaryrefslogtreecommitdiffstats
path: root/test/tmpf.h
diff options
context:
space:
mode:
authorRatan Gupta <ratagupt@in.ibm.com>2017-05-05 17:34:00 +0530
committerPatrick Williams <patrick@stwcx.xyz>2017-06-02 03:35:22 +0000
commit90b92fe48ec72b6c15cce24d33ac983548368b98 (patch)
tree3bd93add19f4e71dc8ca34d8b1e7cba9bbd90586 /test/tmpf.h
parentb3d88c439278b931863344306ff9b5532dc1028f (diff)
downloadphosphor-mboxd-90b92fe48ec72b6c15cce24d33ac983548368b98.tar.gz
phosphor-mboxd-90b92fe48ec72b6c15cce24d33ac983548368b98.zip
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>
Diffstat (limited to 'test/tmpf.h')
-rw-r--r--test/tmpf.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/tmpf.h b/test/tmpf.h
index 61db73d..ce47191 100644
--- a/test/tmpf.h
+++ b/test/tmpf.h
@@ -27,7 +27,7 @@ struct tmpf {
char path[PATH_MAX];
};
-int tmpf_init(struct tmpf *tmpf, const char *template);
+int tmpf_init(struct tmpf *tmpf, const char *template_str);
void tmpf_destroy(struct tmpf *tmpf);
OpenPOWER on IntegriCloud