diff --git a/src/external/sds.h b/src/external/sds.h index 1bdb60d..adcc12c 100644 --- a/src/external/sds.h +++ b/src/external/sds.h @@ -34,7 +34,7 @@ #define __SDS_H #define SDS_MAX_PREALLOC (1024*1024) -const char *SDS_NOINIT; +extern const char *SDS_NOINIT; #include #include diff --git a/src/pmdas/cifs/pmda.c b/src/pmdas/cifs/pmda.c index 84fb50f..9240e3d 100644 --- a/src/pmdas/cifs/pmda.c +++ b/src/pmdas/cifs/pmda.c @@ -25,8 +25,8 @@ static int _isDSO = 1; /* for local contexts */ static char *cifs_procfsdir = "/proc/fs/cifs"; static char *cifs_statspath = ""; -unsigned int global_version_major; -unsigned int global_version_minor; +extern unsigned int global_version_major; +extern unsigned int global_version_minor; pmdaIndom indomtable[] = { { .it_indom = CIFS_FS_INDOM }, diff --git a/src/pmdas/perfevent/configparser.h b/src/pmdas/perfevent/configparser.h index 4f504ea..c6726f2 100644 --- a/src/pmdas/perfevent/configparser.h +++ b/src/pmdas/perfevent/configparser.h @@ -69,9 +69,9 @@ typedef struct configuration { pmcdynamic_t *dynamicpmc; } configuration_t; -int context_newpmc; -int context_derived; /* A flag to check the current pmc */ -int context_dynamic; /* check the current dynamic pmc */ +extern int context_newpmc; +extern int context_derived; /* A flag to check the current pmc */ +extern int context_dynamic; /* check the current dynamic pmc */ /* \brief parse the perf event configuration file * This function allocates memory. The returned object should be passed to diff --git a/src/pmdas/perfevent/configparser.l b/src/pmdas/perfevent/configparser.l index bb139fe..fbdaeca 100644 --- a/src/pmdas/perfevent/configparser.l +++ b/src/pmdas/perfevent/configparser.l @@ -20,6 +20,10 @@ %{ #include "configparser.h" +int context_newpmc; +int context_derived; +int context_dynamic; + static int is_derived(char *name) { char *str = NULL; diff --git a/src/pmdas/perfevent/parse_events.c b/src/pmdas/perfevent/parse_events.c index efe356f..f6d1a7b 100644 --- a/src/pmdas/perfevent/parse_events.c +++ b/src/pmdas/perfevent/parse_events.c @@ -18,6 +18,8 @@ #include "parse_events.h" #include "perfinterface.h" +char dev_dir[PATH_MAX]; /* Optional path prefix for the PMU devices */ + static void cleanup_property(struct property *prop) { if (!prop) diff --git a/src/pmdas/perfevent/parse_events.h b/src/pmdas/perfevent/parse_events.h index 4e09496..8f7a393 100644 --- a/src/pmdas/perfevent/parse_events.h +++ b/src/pmdas/perfevent/parse_events.h @@ -80,11 +80,11 @@ struct software_event { unsigned long long config; }; -char dev_dir[PATH_MAX]; /* Optional path prefix for the PMU devices */ +extern char dev_dir[]; /* Optional path prefix for the PMU devices */ -int init_dynamic_events(struct pmu **pmu_list); -void setup_cpu_config(struct pmu *pmu_ptr, int *ncpus, int **cpuarr); -int get_file_string(char *path, char *buf); -void cleanup_pmu_list(struct pmu *pmu); +extern int init_dynamic_events(struct pmu **pmu_list); +extern void setup_cpu_config(struct pmu *pmu_ptr, int *ncpus, int **cpuarr); +extern int get_file_string(char *path, char *buf); +extern void cleanup_pmu_list(struct pmu *pmu); #endif /* PARSE_EVENTS_H_ */