diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2014-07-03 00:58:04 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-07-03 01:47:06 -0500 |
commit | 38a5b53f55fbccced9b6f4bc0134dcbfe5fe39d0 (patch) | |
tree | 9762f40846b6b1a45661d37c86fe1d0913c40e35 /src/usr/diag | |
parent | ce5d000adc777eab31a578cf33dcaf97aa108517 (diff) | |
download | talos-hostboot-38a5b53f55fbccced9b6f4bc0134dcbfe5fe39d0.tar.gz talos-hostboot-38a5b53f55fbccced9b6f4bc0134dcbfe5fe39d0.zip |
Fix compile for endian calls on old host GCC
Change-Id: I27e18a424ba4bad7dbd33cd17a5c23c65269f51a
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11958
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/diag')
-rwxr-xr-x | src/usr/diag/prdf/common/framework/rule/prdrRegister.H | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/usr/diag/prdf/common/framework/rule/prdrRegister.H b/src/usr/diag/prdf/common/framework/rule/prdrRegister.H index 8bfe4cae4..746427591 100755 --- a/src/usr/diag/prdf/common/framework/rule/prdrRegister.H +++ b/src/usr/diag/prdf/common/framework/rule/prdrRegister.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2004,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -45,6 +47,14 @@ #ifdef __HOSTBOOT_MODULE #include <endian.h> # define htonll(x) htobe64(x) + #ifndef htobe64 + #include <byteswap.h> + #if __BYTE_ORDER == __LITTLE_ENDIAN + #define htobe64(x) __bswap_64(x) + #else + #define htobe64(x) (x) + #endif + #endif #else #include <utilendian.H> #endif |