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

0.9.4 fail to compile using clang-16rc1 #895

Open
powerman opened this issue Feb 9, 2023 · 0 comments · May be fixed by #907
Open

0.9.4 fail to compile using clang-16rc1 #895

powerman opened this issue Feb 9, 2023 · 0 comments · May be fixed by #907

Comments

@powerman
Copy link

powerman commented Feb 9, 2023

make -j24 CC=clang-16 LN=clang-16
...
common.c:208:2: error: incompatible function pointer types initializing 'int (*)(struct pollfd *, unsigned int, int)' with an expression of type 'int (struct pollfd *, nfds_t, int)' (aka 'int (struct pollfd *, unsigned long, int)') [-Wincompatible-function-pointer-types]
        poll,
        ^~~~
1 error generated.
make[1]: *** [Makefile.inc:12: common.o] Error 1

See also: https://bugs.gentoo.org/881015

arkamar added a commit to arkamar/3proxy that referenced this issue 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 functions 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/3proxy that referenced this issue 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: 3proxy#895
See-also: https://bugs.gentoo.org/881015
@arkamar arkamar linked a pull request Mar 21, 2023 that will close this issue
arkamar added a commit to arkamar/gentoo that referenced this issue 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 issue 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 a pull request may close this issue.

1 participant