From 86bbeb8bf1ddabd9092d67a3ccea967de3ed548d Mon Sep 17 00:00:00 2001 From: John Boiles Date: Mon, 25 Aug 2014 15:03:39 -0500 Subject: [PATCH] Fix compilation on clang --- pred_src/util/gopt.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pred_src/util/gopt.h b/pred_src/util/gopt.h index 27ef648..3388f0d 100644 --- a/pred_src/util/gopt.h +++ b/pred_src/util/gopt.h @@ -25,7 +25,8 @@ read http://www.purposeful.co.uk/tfl/ #define GOPT_NOARG 0 #define GOPT_ARG 2 -#define gopt_start(...) (const void*)( const struct { int k; int f; const char *s; const char*const*l; }[]){ __VA_ARGS__, {0}} +typedef struct { int k; int f; const char *s; const char*const*l; } kfsl; +#define gopt_start(...) (const void*)( const kfsl[]){ __VA_ARGS__, {0}} #define gopt_option(k,f,s,l) { k, f, s, l } #define gopt_shorts( ... ) (const char*)(const char[]){ __VA_ARGS__, 0 } #define gopt_longs( ... ) (const char**)(const char*[]){ __VA_ARGS__, NULL }