frr
frr copied to clipboard
fix use of deprecated c-ares api
The c-ares api has deprecated ares_process() and ares_gethostbyname() and it causes a build failure on Fedora 40.
This PR replaces the deprecated functions with their replacements.
Somewhat similar theme as #14869
I'm not sure how to make this backwards compatible with older versions of c-ares, but FRR master doesn't currently build on Fedora 40 with the deprecated functions.
You need to put a bit in the configure.ac file that detects c-ares versioning, see usage of AC_CHECK_LIB examples in the file. If you are not sure how to do that respond here and we can work with you.
You need to put a bit in the configure.ac file that detects c-ares versioning, see usage of AC_CHECK_LIB examples in the file. If you are not sure how to do that respond here and we can work with you.
Thanks. I saw how to add a version dependency in configure.ac. Perhaps I misunderstood your suggestion, but in this case I think both old and new versions of c-ares would need to be supported. Luckily c-ares provides a ARES_VERSION macro in ares_version.h, which is already included.
ci:rerun
@Mergifyio backport stable/10.0
backport stable/10.0
✅ Backports have been created
-
#15916 fix use of deprecated c-ares api (backport #15837) has been created for branch
stable/10.0
@Mergifyio backport stable/9.1 stable/9.0 stable/8.5
backport stable/9.1 stable/9.0 stable/8.5
✅ Backports have been created
-
#15937 fix use of deprecated c-ares api (backport #15837) has been created for branch
stable/9.1
-
#15938 fix use of deprecated c-ares api (backport #15837) has been created for branch
stable/9.0
-
#15939 fix use of deprecated c-ares api (backport #15837) has been created for branch
stable/8.5
but encountered conflicts