The qsort_r function comes with different prototypes on different systems. There are some tests around NEED_DECLARE_QSORT_R and NEED_SWAP_QSORT_R that try to work around that. However, they only work with compilers which accept implicit function declarations. Without support for implicit function declarations in the compiler, I get a build failure: In file included from /builddir/build/BUILD/stellarsolver-2.4/stellarsolver/astrometry/util/bl-sort.c:8: /builddir/build/BUILD/stellarsolver-2.4/stellarsolver/astrometry/util/bl-sort.c: In function 'bl_sort_rec': /builddir/build/BUILD/stellarsolver-2.4/stellarsolver/astrometry/os-features.h:123:17: error: implicit declaration of function 'qsort_r' 123 | #define QSORT_R qsort_r | ^~~~~~~ /builddir/build/BUILD/stellarsolver-2.4/stellarsolver/astrometry/util/bl-sort.c:68:9: note: in expansion of macro 'QSORT_R' 68 | QSORT_R(NODE_DATA(node), node->N, list->datasize, &ft, qcompare); | ^~~~~~~ If I add -D_GNU_SOURCE to the build flags, the build fails because of a conflicting prototype: In file included from /builddir/build/BUILD/stellarsolver-2.4/stellarsolver/astrometry/blind/engine.c:40: /builddir/build/BUILD/stellarsolver-2.4/stellarsolver/astrometry/os-features.h:113:6: error: conflicting types for 'qsort_r'; have 'void(void *, size_t, size_t, void *, int (*)(void *, const void *, const void *))' {aka 'void(void *, long unsigned int, long unsigned int, void *, int (*)(void *, const void *, const void *))'} 113 | void qsort_r(void *base, size_t nmemb, size_t sz, | ^~~~~~~ In file included from /builddir/build/BUILD/stellarsolver-2.4/stellarsolver/astrometry/blind/engine.c:13: /usr/include/stdlib.h:854:13: note: previous declaration of 'qsort_r' with type 'void(void *, size_t, size_t, int (*)(const void *, const void *, void *), void *)' {aka 'void(void *, long unsigned int, long unsigned int, int (*)(const void *, const void *, void *), void *)'} 854 | extern void qsort_r (void *__base, size_t __nmemb, size_t __size, | ^~~~~~~ So there does not seem to be a good way to build this program with C99 compilers on glibc (or other non-BSD platforms). A potential workaround would involve building with -std=gnu89, but I have not tried that yet. Also filed upstream: https://github.com/rlancaste/stellarsolver/issues/125
Thanks for taking care of reporting upstream.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle. Changing version to 38.
FEDORA-2024-6c5e6780b2 (stellarsolver-2.6-1.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2024-6c5e6780b2
FEDORA-2024-6c5e6780b2 (stellarsolver-2.6-1.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report.