From c998b2e9a5e5a54d14c6dc94e7e3ab4feaea4086 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 25 May 2010 15:51:48 +0200 Subject: [PATCH] Use C89 struct initializers to workaround compilers that don't grok C99. Thanks to Mihael Schmidt for reporting the problem and testing the patch with the IBM ILE C compiler. --- src/prop_rb.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/prop_rb.c b/src/prop_rb.c index 3d9f154..13e8d9e 100644 --- a/src/prop_rb.c +++ b/src/prop_rb.c @@ -73,10 +73,15 @@ static bool rb_tree_check_node(const struct rb_tree *, const struct rb_node *, * cause a fault. */ static const struct rb_node sentinel_node = { - .rb_nodes = { RBUNCONST(&sentinel_node), - RBUNCONST(&sentinel_node), - NULL }, - .rb_u = { .u_s = { .s_sentinel = 1 } }, + { RBUNCONST(&sentinel_node), + RBUNCONST(&sentinel_node), + NULL }, +#if BYTE_ORDER == LITTLE_ENDIAN + { { 0, 0, 0, 1 } } +#endif +#if BYTE_ORDER == BIG_ENDIAN + { { 1, 0, 0, 0 } } +#endif }; void -- 2.11.4.GIT