Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android: Can we use proper libc typedefs in stat definition? #3285

Open
danielocfb opened this issue Jun 27, 2023 · 0 comments · May be fixed by #3286
Open

android: Can we use proper libc typedefs in stat definition? #3285

danielocfb opened this issue Jun 27, 2023 · 0 comments · May be fixed by #3286
Labels
C-bug Category: bug

Comments

@danielocfb
Copy link

danielocfb commented Jun 27, 2023

If we look at the stat type's definition for different platforms, we see:

st_dev: dev_t
st_ino: ino_t
[...]

But for arm-linux-androideabi we stop using libc typedefs and instead have:

st_dev: c_ulonglong
st_mode: c_uint
[...]
st_ino: c_ulonglong

Is there a (good) reason for this divergence? If I look at ino_t it's actually defined to be a c_ulong, not c_ulonglong, so that will lead to mismatches all over the place when the typedefs are used. Is this mandated somewhere, a bug in the platform definition that we need to support? This is a nightmare to support in user code.

@danielocfb danielocfb added the C-bug Category: bug label Jun 27, 2023
devnexen added a commit to devnexen/libc that referenced this issue Jun 28, 2023
@devnexen devnexen linked a pull request Jun 28, 2023 that will close this issue
bors added a commit that referenced this issue Jan 8, 2024
android 32 bits fix stat struct proposal.

close #3285
JohnTitor pushed a commit to devnexen/libc that referenced this issue Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant