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 poll with nfds_t type #907

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

arkamar
Copy link

@arkamar arkamar commented Mar 21, 2023

Clang 16 makes -Wincompatible-function-pointer-types an error by default, which causes build failure for (*_poll) function because nfds_t does not need to be equivalent to unsigned int. This commit changes it in all poll function definitions and prototypes to nfds_t as it is defined by POSIX and defines nfds_t type as unsigned int when WITH_POLL is not defined.

Fixes: #895
See-also: https://bugs.gentoo.org/881015

Clang 16 makes -Wincompatible-function-pointer-types an error by
default, which causes build failure for `(*_poll)` function because
`nfds_t` does not need to be equivalent to `unsigned int`. This commit
changes it in all poll function definitions and prototypes to `nfds_t`
as it is defined by POSIX and defines `nfds_t` type as `unsigned int`
when `WITH_POLL` is not defined.

Fixes: 3proxy#895
See-also: https://bugs.gentoo.org/881015
arkamar added a commit to arkamar/gentoo that referenced this pull request Mar 21, 2023
- EAPI bump
- update HOMEPAGE and SRC_URI
- update gentoo patch
- add fix for clang-16 [1,2]
- remove src_compile phase, CC is now exported in src_prepare, LN is
  not needed anymore as it is set to $(CC) by default.

[1] 3proxy/3proxy#895
[2] 3proxy/3proxy#907

Closes: https://bugs.gentoo.org/881015
Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Mar 22, 2023
- EAPI bump
- update HOMEPAGE and SRC_URI
- update gentoo patch
- add fix for clang-16 [1,2]
- remove src_compile phase, CC is now exported in src_prepare, LN is
  not needed anymore as it is set to $(CC) by default.

[1] 3proxy/3proxy#895
[2] 3proxy/3proxy#907

Closes: https://bugs.gentoo.org/881015
Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
Closes: #30287
Signed-off-by: Sam James <sam@gentoo.org>
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.

0.9.4 fail to compile using clang-16rc1
1 participant