From: Anton Blanchard <anton@samba.org>
To: fio@vger.kernel.org
Subject: [PATCH] Fix big endian build
Date: Mon, 7 Nov 2011 22:44:36 +1100 [thread overview]
Message-ID: <20111107224436.3802ff85@kryten> (raw)
I get the following error when building fio on PowerPC:
client.c: In function ‘convert_agg’:
client.c:641:22: error: invalid operands to binary & (have ‘long double’ and ‘long long unsigned int’)
It looks like we have things backwards, we should byteswap the
integer value before we convert it to a double.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
diff --git a/client.c b/client.c
index a61bc80..f167549 100644
--- a/client.c
+++ b/client.c
@@ -638,7 +638,7 @@ static void convert_agg(struct disk_util_agg *agg)
agg->io_ticks = le32_to_cpu(agg->io_ticks);
agg->time_in_queue = le32_to_cpu(agg->time_in_queue);
agg->slavecount = le32_to_cpu(agg->slavecount);
- agg->max_util.u.f = __le64_to_cpu(fio_uint64_to_double(agg->max_util.u.i));
+ agg->max_util.u.f = fio_uint64_to_double(__le64_to_cpu(agg->max_util.u.i));
}
static void convert_dus(struct disk_util_stat *dus)
next reply other threads:[~2011-11-07 11:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-07 11:44 Anton Blanchard [this message]
2011-11-07 13:15 ` [PATCH] Fix big endian build Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111107224436.3802ff85@kryten \
--to=anton@samba.org \
--cc=fio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.