summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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)
tree7f994b3168f6528436b7e639a7449a250853d91e
parent5e94474610e3d6778af0c1b91b1debb7f4fa3605 (diff)
downloadefl-devs/felipealmeida/csharp.tar.gz
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
-rw-r--r--src/lib/ecore/ecore_main.c5
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;
+#endif
static int do_quit = 0;
static Ecore_Fd_Handler *fd_handlers = NULL;
static Ecore_Fd_Handler *fd_handler_current = NULL;