From 0a5bfb4fda7654bfda701f825c796e54150545a1 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 3 Aug 2020 06:26:34 +0200 Subject: [PATCH] portability: multiple typedefs Older versions of GCC (4.1.2 here) don't like repeated typedefs. CC src/bison-parse-simulation.o src/parse-simulation.c:61: error: redefinition of typedef 'parse_state' src/parse-simulation.h:74: error: previous declaration of 'parse_state' was here make: *** [Makefile:7876: src/bison-parse-simulation.o] Error 1 Reported by Nelson H. F. Beebe. * src/parse-simulation.c (parse_state): Don't typedef, parse-simulation.h did it already. --- src/parse-simulation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parse-simulation.c b/src/parse-simulation.c index ba09c44c..70bfb177 100644 --- a/src/parse-simulation.c +++ b/src/parse-simulation.c @@ -28,7 +28,7 @@ #include "lssi.h" #include "nullable.h" -typedef struct parse_state +struct parse_state { // Path of state-items the parser has traversed. struct si_chunk @@ -58,7 +58,7 @@ typedef struct parse_state // Causes chunk contents to be freed when the reference count is // one. Used when only the chunk metadata will be needed. bool free_contents_early; -} parse_state; +}; static void