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

use uid_t instead of __uid_t #87

Merged
merged 1 commit into from Jan 28, 2022
Merged

use uid_t instead of __uid_t #87

merged 1 commit into from Jan 28, 2022

Conversation

ghost
Copy link

@ghost ghost commented Jan 28, 2022

uclibc and glibc define getuid() as
extern __uid_t getuid (void) __THROW;
https://elixir.bootlin.com/glibc/glibc-2.34/source/posix/unistd.h#L698
which is a typedef for unsigned int.

musl uses uid_t as return type
uid_t getuid(void);
https://elixir.bootlin.com/musl/v1.2.2/source/include/unistd.h#L108
which is a typedef to unsigned.

glibc and uclibc include typedefs from __uid_t to uid_t,
which means one should be able to use uid_t as a replacement
for __uid_t and make compiling with all three c standard libraries
possible.

uclibc and glibc define getuid() as
extern __uid_t getuid (void) __THROW;
https://elixir.bootlin.com/glibc/glibc-2.34/source/posix/unistd.h#L698
which is a typedef for unsigned int.

musl uses uid_t as return type
uid_t getuid(void);
https://elixir.bootlin.com/musl/v1.2.2/source/include/unistd.h#L108
which is a typedef to unsigned.

glibc and uclibc include typedefs from __uid_t to uid_t,
which means one should be able to use uid_t as a replacement
for __uid_t and make compiling with all three c standard libraries
possible.
@rm5248 rm5248 merged commit c172869 into dbus-cxx:master Jan 28, 2022
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.

None yet

2 participants