ref: 562835308b23c51fdba1d1923c489a1fd3a7d056
parent: 927c65e863a109ec81376abff02db10afbcc9543
parent: 65121e6d5d2b9cb15283a0d5c46addeb67d20a7b
author: Eldred Habert <[email protected]>
date: Tue Apr 7 11:18:23 EDT 2020
Merge pull request #504 from runlevel5/gcc10-fix Fix multiple definitions for GCC10
--- a/include/gfx/main.h
+++ b/include/gfx/main.h
@@ -83,7 +83,7 @@
int size;
};
-int depth, colors;
+extern int depth, colors;
#include "gfx/makepng.h"
#include "gfx/gb.h"
--- a/src/gfx/gb.c
+++ b/src/gfx/gb.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include "gfx/main.h"
+#include "gfx/gb.h"
void transpose_tiles(struct GBImage *gb, int width)
{
--- a/src/gfx/main.c
+++ b/src/gfx/main.c
@@ -15,6 +15,8 @@
#include "extern/getopt.h"
#include "version.h"
+int depth, colors;
+
/* Short options */
static char const *optstring = "Aa:CDd:Ffhmo:Pp:Tt:uVvx:";
--- a/src/gfx/makepng.c
+++ b/src/gfx/makepng.c
@@ -11,7 +11,7 @@
#include <stdlib.h>
#include <string.h>
-#include "gfx/main.h"
+#include "gfx/makepng.h"
static void initialize_png(struct PNGImage *img, FILE * f);
static struct RawIndexedImage *indexed_png_to_raw(struct PNGImage *img);