diff options
author | Michael Lauer <mickey@vanille-media.de> | 2005-08-08 16:58:17 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2005-08-08 16:58:17 +0000 |
commit | 1363b0b7be175125f2e62ecff97ed87b79bfabb2 (patch) | |
tree | 2ed455169a31955a980d02e80b58528069182355 /packages/udev/udev-065/fix-alignment.patch | |
parent | f0b70c2b466aac9bcf1026f87ec3baf7e7dc0c5e (diff) |
add udev-065
Diffstat (limited to 'packages/udev/udev-065/fix-alignment.patch')
-rw-r--r-- | packages/udev/udev-065/fix-alignment.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/packages/udev/udev-065/fix-alignment.patch b/packages/udev/udev-065/fix-alignment.patch new file mode 100644 index 0000000000..8c7b8b5ac5 --- /dev/null +++ b/packages/udev/udev-065/fix-alignment.patch @@ -0,0 +1,24 @@ +diff --git a/udev_rules_parse.c b/udev_rules_parse.c +--- a/udev_rules_parse.c ++++ b/udev_rules_parse.c +@@ -241,6 +241,7 @@ static int add_to_rules(struct udev_rule + int valid; + char *linepos; + char *attr; ++ size_t padding; + int retval; + + /* get all the keys */ +@@ -506,6 +507,11 @@ static int add_to_rules(struct udev_rule + + /* grow buffer and add rule */ + rule_size = sizeof(struct udev_rule) + rule->bufsize; ++ padding = (sizeof(size_t) - rule_size % sizeof(size_t)) % sizeof(size_t); ++ dbg("add %zi padding bytes", padding); ++ rule_size += padding; ++ rule->bufsize += padding; ++ + rules->buf = realloc(rules->buf, rules->bufsize + rule_size); + if (!rules->buf) { + err("realloc failed"); + |