mtd: add missing <endian.h> include
authorFelix Fietkau <nbd@openwrt.org>
Fri, 5 Jun 2015 09:00:02 +0000 (09:00 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 5 Jun 2015 09:00:02 +0000 (09:00 +0000)
commit0ecf8672ccd4165344fb0a619d7f69e254be1d6d
treee4249ef58cba063495a2168ed3d243131bf0fdb5
parent54205c341503ee82e203b43d222016565b8bb908
mtd: add missing <endian.h> include

trx.c in mtd would not include endian.h, so on systems that do not have
this header implicitly included from the other headers (like musl), both
__BYTE_ORDER and __BIG_ENDIAN would be undefined and thus 0, leading to
it always presuming a big-endian system. this would lead to issues when
running mtd fixtrx on little-endian systems, as it would never recognize
the TRX magic as result of the broken STORE32_LE() macro.

Signed-off-by: Shiz <hi@shiz.me>
Tested-by: Shiz <hi@shiz.me>
SVN-Revision: 45896
package/system/mtd/src/trx.c