Skip to content

Commit

Permalink
Global CONFIG_FILE variable defined without extern in header file
Browse files Browse the repository at this point in the history
  Since GCC 10.1.0 (2020-05-07) default compilation options to use -fno-common, which means that by default, the code above no longer links unless you override the default with -fcommon
  • Loading branch information
beorn- committed Jun 11, 2020
1 parent 92c51fc commit d98db89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/umonitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ static const struct option long_options[] = {
{"force-load", no_argument, &force_load, 1}
};

/* Definition checked against declaration in umonitor.h */
char* CONFIG_FILE;

void umon_print(const char *format, ...)
{
Expand Down
2 changes: 1 addition & 1 deletion src/umonitor.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Global variables
char *CONFIG_FILE; /*!< Configuration file path name */
extern char *CONFIG_FILE; /*!< Configuration file path name */

// Some helper functions
void fetch_edid(xcb_randr_output_t * output_p, screen_class * screen_t_p,
Expand Down

0 comments on commit d98db89

Please # to comment.