diff options
author | Yann E. MORIN <yann.morin.1998@free.fr> | 2015-04-04 13:47:32 +0200 |
---|---|---|
committer | Yann E. MORIN <yann.morin.1998@free.fr> | 2015-04-04 14:02:20 +0200 |
commit | d2aeb8b63dfcb15161c4dd3e80491c844c3f0581 (patch) | |
tree | 619216e9cd28b768de1b8741ed908812b8c68c25 /src/udev | |
parent | 6a398265f3bd30a252cba2b1ada04ff1c617cf96 (diff) |
Revert "udev: rules - modernise add_rule a bit"
Initialisers for anonymous unions are unknown to gcc-4.5, which is still
quite widely used.
See the following build failure, reported by the Buildroot autobuilders:
http://autobuild.buildroot.org/results/11e/11ebb926b891862e270b9cb39fd2ed4344b736a8/build-end.log
This reverts commit 5cb98078479d93e25099c1cb73fa9c46aa9ccf29.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Tom Gundersen <teg@jklm.no>
Diffstat (limited to 'src/udev')
-rw-r--r-- | src/udev/udev-rules.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index 5a4792e4d5..3a96c8a0e5 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -1047,11 +1047,11 @@ static int add_rule(struct udev_rules *rules, char *line, const char *filename, unsigned int filename_off, unsigned int lineno) { char *linepos; const char *attr; - struct rule_tmp rule_tmp = { - .rules = rules, - .rule.type = TK_RULE, - }; + struct rule_tmp rule_tmp; + memzero(&rule_tmp, sizeof(struct rule_tmp)); + rule_tmp.rules = rules; + rule_tmp.rule.type = TK_RULE; /* the offset in the rule is limited to unsigned short */ if (filename_off < USHRT_MAX) rule_tmp.rule.rule.filename_off = filename_off; |