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

net-snmp: fix compilation with GCC 14 #24157

Merged
merged 1 commit into from
May 17, 2024

Conversation

vortexilation
Copy link
Contributor

Missing header & incompatible pointer type is now an error

Maintainer: @stintel
Compile tested: x86_64
Run tested: Test needed, test not done, since I am not using snmpd.

Description:

Functionalities wise not tested but seems to be passed compilation.
I am fairly new in github or git, assistance might be needed from developers.

Sorry for the last 2 failed PR attempt.

@stintel
Copy link
Member

stintel commented May 14, 2024

Was this submitted upstream?

@vortexilation
Copy link
Contributor Author

No, only personal trial.

I don't think upstream will accept ieee802dot11.c module.

@vortexilation
Copy link
Contributor Author

vortexilation commented May 15, 2024

I am sorry need update, submitted the wrong changes.

@vortexilation
Copy link
Contributor Author

vortexilation commented May 16, 2024

@neheb
Please kindly review my new commit, as previously was the wrong changes.

Also How to squash the commit into one and push?.

@neheb
Copy link
Contributor

neheb commented May 16, 2024

git rebase -i HEAD~2

replace pick with s on the last commit.
git push --force

Refresh 900-musl-compat.patch, add missing headers & fixes incompatible pointer type is now an error.

Signed-off-by: Aditya Nugraha <vortexilation@gmail.com>
@neheb neheb merged commit 7d39868 into openwrt:master May 17, 2024
12 checks passed
@neheb
Copy link
Contributor

neheb commented May 17, 2024

large_fd_set.c: In function 'LFD_SET':
large_fd_set.c:97:39: error: initialization of 'u_int32_t *' {aka 'unsigned int *'} from incompatible pointer type 'long unsigned int *' [-Wincompatible-pointer-types]
   97 |     NETSNMP_FD_MASK_TYPE *fds_array = p->fds_bits;
      |                                       ^
large_fd_set.c: In function 'LFD_CLR':
large_fd_set.c:105:39: error: initialization of 'u_int32_t *' {aka 'unsigned int *'} from incompatible pointer type 'long unsigned int *' [-Wincompatible-pointer-types]
  105 |     NETSNMP_FD_MASK_TYPE *fds_array = p->fds_bits;
      |                                       ^
large_fd_set.c: In function 'LFD_ISSET':
large_fd_set.c:113:45: error: initialization of 'const u_int32_t *' {aka 'const unsigned int *'} from incompatible pointer type 'const long unsigned int *' [-Wincompatible-pointer-types]
  113 |     const NETSNMP_FD_MASK_TYPE *fds_array = p->fds_bits;
      |                                             ^
make[4]: *** [Makefile:101: large_fd_set.lo] Error 1

Make another PR. Reverting this brokenness.

@vortexilation
Copy link
Contributor Author

@neheb
Thank you for approving my first contribution, I didn't get that error before, maybe because I am using glibc?, I will see what I can do about it.

@stintel
Copy link
Member

stintel commented May 17, 2024

Please always test using musl, this is the default libc for all but one target.

@vortexilation
Copy link
Contributor Author

Ok, sorry for these.

@vortexilation vortexilation deleted the net-snmp-fixes branch May 19, 2024 06:25
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

3 participants