diff options
author | Bin Meng | 2019-10-27 05:19:42 -0700 |
---|---|---|
committer | Tom Rini | 2019-10-28 13:32:51 -0400 |
commit | afd3bf4318b0b3e845b5bc1f6763727229af9179 (patch) | |
tree | 303ac8e01ef0055d09d1083219e438bf3eba8f14 | |
parent | a7c9a65ed9feee937c6b40a971d03e9c2f8447ca (diff) |
tools: zynqmpbif: Use compiler builtin instead of linux-specific __swab32
__swab32() is a Linux specific macro defined in linux/swab.h. Let's
use the compiler equivalent builtin function __builtin_bswap32() for
better portability.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
-rw-r--r-- | tools/zynqmpbif.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/zynqmpbif.c b/tools/zynqmpbif.c index 8c47107c7b9..82ce0ac1a52 100644 --- a/tools/zynqmpbif.c +++ b/tools/zynqmpbif.c @@ -517,7 +517,7 @@ static int bif_add_bit(struct bif_entry *bf) debug("Bitstream Length: 0x%x\n", bitlen); for (i = 0; i < bitlen; i += sizeof(uint32_t)) { uint32_t *bitbin32 = (uint32_t *)&bitbin[i]; - *bitbin32 = __swab32(*bitbin32); + *bitbin32 = __builtin_bswap32(*bitbin32); } if (!bf->dest_dev) |