ITADN

Fix compilation issues on modern systems with GCC

#1225Pull Requestguifavretto 创建于 2026-03-24
G
guifavrettocommented
In systems with modern glibc (like Arch Linux), including system headers before config.h could lead to _POSIX_C_SOURCE macro redefinition errors. Added include guards to config.h and a #ifndef protection for _POSIX_C_SOURCE to prevent this. Also, fixed a -Werror=discarded-qualifiers warning when casting the result of strstr to char * in bits.c. * configure.ac: Add AH_TOP and AH_BOTTOM for CONFIG_H include guards. Use AH_VERBATIM to wrap _POSIX_C_SOURCE in #ifndef. * src/bits.c (bit_is_U_expand, bit_is_M_expand): Add explicit (char *) cast to the strstr return value. * src/config.h.in: Regenerated to reflect the new include guards and macro protections.
合并状态:未合并 2 条评论