threads / patch / 15120

patchrevision.h: make show_early_output an extern which is defined in revision.c

Subject: [PATCH] revision.h: make show_early_output an extern which is defined in revision.c

## tl;dr

One message between Aug 21, 2008 and Aug 21, 2008. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Brandon Casey· Aug 21, 2008, 00:34 UTC · lore

The variable show_early_output is defined in revision.c and should be declared extern in revision.h so that the linker does not complain about multiply defined variables.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
 revision.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to revision.h +1 −1
diff --git a/revision.h b/revision.h
index f64e8ce..1b04566 100644
--- a/revision.h
+++ b/revision.h
@@ -119,7 +119,7 @@ struct rev_info {
 void read_revisions_from_stdin(struct rev_info *revs);
 
 typedef void (*show_early_output_fn_t)(struct rev_info *, struct commit_list *);
-volatile show_early_output_fn_t show_early_output;
+extern volatile show_early_output_fn_t show_early_output;
 
 extern void init_revisions(struct rev_info *revs, const char *prefix);
 extern int setup_revisions(int argc, const char **argv, struct rev_info *revs, const char *def);
-- 
1.6.0.13.ge1c8

← back to recent threads