Skip to content
Snippets Groups Projects
Commit f8ec89ab authored by nbd's avatar nbd
Browse files

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: default avatarShiz <hi@shiz.me>
Tested-by: default avatarShiz <hi@shiz.me>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45896 3c298f89-4303-0410-b956-a3cf2f4a3e73
parent b2fb96a5
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,7 @@
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <endian.h>
#include <string.h>
#include <errno.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment