[sheepdog] [PATCH 2/2] fix double declaration of global variables
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Mon Feb 4 07:33:53 CET 2013
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
sheep/sheep_priv.h | 2 +-
sheep/work.h | 4 ++--
sheepfs/sheepfs.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sheep/sheep_priv.h b/sheep/sheep_priv.h
index 1e1a28a..e2536c5 100644
--- a/sheep/sheep_priv.h
+++ b/sheep/sheep_priv.h
@@ -187,7 +187,7 @@ int for_each_object_in_wd(int (*func)(uint64_t oid, void *arg), bool cleanup,
void *arg);
int err_to_sderr(uint64_t oid, int err);
-struct list_head store_drivers;
+extern struct list_head store_drivers;
#define add_store_driver(driver) \
static void __attribute__((constructor)) add_ ## driver(void) { \
list_add(&driver.list, &store_drivers); \
diff --git a/sheep/work.h b/sheep/work.h
index 62b9bc5..0d125dc 100644
--- a/sheep/work.h
+++ b/sheep/work.h
@@ -41,8 +41,8 @@ struct worker_info {
pthread_t worker_thread; /* used for an ordered work queue */
};
-struct list_head worker_info_list;
-int total_ordered_workers;
+extern struct list_head worker_info_list;
+extern int total_ordered_workers;
/* if 'ordered' is true, the work queue are processes in order. */
struct work_queue *init_work_queue(const char *name, bool ordered);
diff --git a/sheepfs/sheepfs.h b/sheepfs/sheepfs.h
index d1ca83e..0f855de 100644
--- a/sheepfs/sheepfs.h
+++ b/sheepfs/sheepfs.h
@@ -31,7 +31,7 @@ int sheepfs_set_op(const char *path, unsigned opcode);
typedef void (*printf_fn)(const char *func, int line, const char *, ...)
__attribute__ ((format (__printf__, 3, 4)));
-printf_fn fs_printf;
+extern printf_fn fs_printf;
#define sheepfs_pr(fmt, args...) \
({ \
--
1.7.2.5
More information about the sheepdog
mailing list