diff options
author | Semun Lee <semun.lee@samsung.com> | 2020-01-03 11:11:22 +0900 |
---|---|---|
committer | Semun Lee <semun.lee@samsung.com> | 2020-01-03 11:11:22 +0900 |
commit | d8ea722e8aa86049f99892daa96b3799284a1306 (patch) | |
tree | 43e10c31f33c660cc9ca4dc2a14b4c7bd86adcd0 | |
parent | f1b0047c9f78e61aab03f9d5aa8427446013c350 (diff) | |
download | mtp-responder-d8ea722e8aa86049f99892daa96b3799284a1306.tar.gz mtp-responder-d8ea722e8aa86049f99892daa96b3799284a1306.tar.bz2 mtp-responder-d8ea722e8aa86049f99892daa96b3799284a1306.zip |
Fix wrong endian conversion macrosubmit/tizen/20200103.031601accepted/tizen/unified/20200103.050122
Change-Id: Id7130b79739cd8ba6f9271f28db18d7b6a0baa79
Signed-off-by: Semun Lee <semun.lee@samsung.com>
-rw-r--r-- | include/transport/mtp_descs_strings.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/transport/mtp_descs_strings.h b/include/transport/mtp_descs_strings.h index 26cf650..9e340f5 100644 --- a/include/transport/mtp_descs_strings.h +++ b/include/transport/mtp_descs_strings.h @@ -28,10 +28,15 @@ enum functionfs_flags { }; #endif +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +#define cpu_to_le16(x) (x) +#define cpu_to_le32(x) (x) +#else #define cpu_to_le16(x) ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8)) #define cpu_to_le32(x) \ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | \ (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) +#endif #define le32_to_cpu(x) le32toh(x) #define le16_to_cpu(x) le16toh(x) |