diff options
author | Przemyslaw Kedzierski <p.kedzierski@samsung.com> | 2013-09-05 16:51:14 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2013-09-05 16:51:14 +0200 |
commit | 4b10db639cd81b5d70e4590d6afa40454b949045 (patch) | |
tree | e60dcc747d793e4dc25411693f97fdfb56987337 | |
parent | 5f22e8d6efa5ed7f9b0c82ebd92d366af85a3a40 (diff) | |
download | kdbus-bus-4b10db639cd81b5d70e4590d6afa40454b949045.tar.gz kdbus-bus-4b10db639cd81b5d70e4590d6afa40454b949045.tar.bz2 kdbus-bus-4b10db639cd81b5d70e4590d6afa40454b949045.zip |
Some corrections to make test-kdbus work on i686.
Signed-off-by: Przemyslaw Kedzierski <p.kedzierski@samsung.com>
-rw-r--r-- | test/kdbus-util.c | 7 | ||||
-rw-r--r-- | test/test-kdbus.c | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/test/kdbus-util.c b/test/kdbus-util.c index 940fa77fdde..2ac9e4ce5d9 100644 --- a/test/kdbus-util.c +++ b/test/kdbus-util.c @@ -34,7 +34,7 @@ struct conn *connect_to_bus(const char *path) { int fd, ret; - struct kdbus_cmd_hello hello; + struct kdbus_cmd_hello __attribute__ ((__aligned__(8))) hello; struct conn *conn; memset(&hello, 0, sizeof(hello)); @@ -204,12 +204,13 @@ char *msg_id(uint64_t id, char *buf) void msg_dump(const struct conn *conn, const struct kdbus_msg *msg) { const struct kdbus_item *item = msg->items; - char buf[32]; + char buf_src[32]; + char buf_dst[32]; printf("MESSAGE: %s (%llu bytes) flags=0x%llx, %s → %s, cookie=%llu, timeout=%llu\n", enum_PAYLOAD(msg->payload_type), (unsigned long long) msg->size, (unsigned long long) msg->flags, - msg_id(msg->src_id, buf), msg_id(msg->dst_id, buf), + msg_id(msg->src_id, buf_src), msg_id(msg->dst_id, buf_dst), (unsigned long long) msg->cookie, (unsigned long long) msg->timeout_ns); KDBUS_PART_FOREACH(item, msg, items) { diff --git a/test/test-kdbus.c b/test/test-kdbus.c index 32268e65660..1bb837a5d33 100644 --- a/test/test-kdbus.c +++ b/test/test-kdbus.c @@ -19,7 +19,7 @@ static void add_match_empty(int fd) { - struct kdbus_cmd_match cmd_match; + struct kdbus_cmd_match __attribute__ ((__aligned__(8))) cmd_match; int ret; memset(&cmd_match, 0, sizeof(cmd_match)); |