diff options
authorLauro Moura <lauromoura@expertisesolutions.com.br>2017-11-07 17:01:56 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-11-29 23:06:07 -0200
commitdf82e5cfde3e1aa7321f2cf12eb8275089e30655 (patch)
parentelm: Move legacy enums to elm_general.eot. (diff)
ecore: Fix compilation for GCC 4devs/felipealmeida/csharp
Summary: GCC4 support compound literals for static initializers only in C89. This commit reverts to the previous behavior when using this version. Currently we are using it to build on Windows. Reviewers: felipealmeida, cedric, barbieri Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D5518
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index c5544e4fe7..5daa1d1c10 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -285,7 +285,12 @@ int in_main_loop = 0;
static Eina_List *_pending_futures = NULL;
static Eina_List *_pending_promises = NULL;
+#if (defined __GNUC__) && (__GNUC__ <= 4)
+// GCC 4 does not support compound literal for statics initializers in C99
+static Eina_Value _ecore_exit_code = {0};
+# else
static Eina_Value _ecore_exit_code = EINA_VALUE_EMPTY;
static int do_quit = 0;
static Ecore_Fd_Handler *fd_handlers = NULL;
static Ecore_Fd_Handler *fd_handler_current = NULL;