Skip to content

iobuffer: Fix encoding/decoding on big-endian - #17

Merged
flamingradian merged 1 commit into
linux-msm:mainfrom
neuschaefer:endian
Jan 1, 2026
Merged

flamingradian merged 1 commit into
linux-msm:mainfrom
neuschaefer:endian

Conversation

@neuschaefer

Copy link
Copy Markdown
Contributor

It is possible (albeit unusual) to boot a big-endian system on a smartphone, and it's generally good to have portable code.

The code readability is debatable, but the function is tested on little-endian and big-endian systems. The iobuffer test passes.

@flamingradian flamingradian left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for not sending a review earlier. I wanted to not add extra functions but couldn't think of how to do this until now.

Comment thread hexagonrpcd/iobuffer.c Outdated
It is possible (albeit unusual) to boot a big-endian system on a
smartphone, and it's generally good to have portable code.

le32toh and htole32 are a glibc extension that is also implemented by
musl-libc, uclibc-ng, and bionic.

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
@flamingradian
flamingradian merged commit 93f3467 into linux-msm:main Jan 1, 2026
2 checks passed
@neuschaefer
neuschaefer deleted the endian branch January 3, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants