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

2249 nut master branch builds broken after recent prs andor infra changes #2251

Conversation

aquette
Copy link
Member

@aquette aquette commented Dec 24, 2023

nut-scanner: simplify and fix simulation scan code

Remove non-portable directory and alphasort filtering code, since there is no
actual need for it, and cause system portability issues.
Also fix the simulation scan function prototype.

Closes: #2249

Please CI and add void args

Signed-off-by: Arnaud Quette <[email protected]>
Sorting is not needed, and despite alphasort being supported since:
* Since glibc 2.10: (_POSIX_C_SOURCE >= 200809L)
* || Glibc versions <= 2.19: (_BSD_SOURCE || _SVID_SOURCE)
it seems still not supported on some platforms.

Signed-off-by: Arnaud Quette <[email protected]>
Remove non-portable directory-filtering code, since there is no actual
need for it, and very few chances of false positive results.

Signed-off-by: Arnaud Quette <[email protected]>
@aquette aquette requested a review from jimklimov December 24, 2023 13:58
Reimplement scan algorithm, and remove non-portable scandir code.
Get back to my early implemention, using opendir/readdir, as in
common/common.c. This works and is portable!

Signed-off-by: Arnaud Quette <[email protected]>
@AppVeyorBot
Copy link

@jimklimov
Copy link
Member

scan_nut_simulation.c:58:15: error: mixing declarations and code is incompatible with standards before C99 [-Werror,-Wdeclaration-after-statement]
                const char *ext = strrchr(dirp->d_name,'.');
                            ^
1 error generated.

@jimklimov
Copy link
Member

Behind the curtains - hopefully fixed a NUT CI infra issue with misbehaving OpenIndiana builds.

Also directly fixed a problem here with coding style which had upset many platforms.

Testing both points by the PR rebuild...

@jimklimov jimklimov merged commit b22c133 into networkupstools:master Dec 25, 2023
6 checks passed
@jimklimov
Copy link
Member

Yay, all green now!

@jimklimov jimklimov added bug CI Entries related to continuous integration infrastructure (historically also recipes like Makefiles) labels Jan 2, 2024
@jimklimov jimklimov added this to the 2.8.2 milestone Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug CI Entries related to continuous integration infrastructure (historically also recipes like Makefiles)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

NUT master-branch builds broken after recent PRs and/or infra changes
3 participants