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

Type uint is undefined on musl #952

Closed
orlitzky opened this issue Mar 28, 2024 · 2 comments
Closed

Type uint is undefined on musl #952

orlitzky opened this issue Mar 28, 2024 · 2 comments

Comments

@orlitzky
Copy link
Contributor

When building nagios against the musl C library, the type uint is undefined. This leads to a few errors, the tl;dr of which is

t-utils.c:139:21: error: unknown type name 'uint'; did you mean 'int'?
  139 | int ok_uint(uint a, uint b, const char *name)
      |                     ^~~~
      |                     int

The root cause of this is that while uint is usually an alias for unsigned int, it actually isn't part of the C standard. Musl does have the uint typedef available in <sys/types.h>, but the simplest fix would be to find & replace uint with either unsigned or unsigned int. Then the header is not needed.

@sawolf
Copy link
Member

sawolf commented Mar 29, 2024

Thanks for the report! We'll get this resolved for next release.

@sawolf sawolf closed this as completed in 19602fa Apr 1, 2024
sawolf added a commit that referenced this issue Apr 1, 2024
@orlitzky
Copy link
Contributor Author

orlitzky commented Apr 1, 2024

That was fast, thanks. I backported your patch to our Gentoo package for nagios-4.5.1 so we're about to find out if it works :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants