frr icon indicating copy to clipboard operation
frr copied to clipboard

fix use of deprecated c-ares api

Open acooks-at-bda opened this issue 10 months ago • 4 comments

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.

acooks-at-bda avatar Apr 25 '24 08:04 acooks-at-bda

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.

acooks-at-bda avatar Apr 25 '24 10:04 acooks-at-bda

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.

donaldsharp avatar Apr 25 '24 11:04 donaldsharp

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.

acooks-at-bda avatar Apr 26 '24 00:04 acooks-at-bda

ci:rerun

acooks-at-bda avatar Apr 27 '24 00:04 acooks-at-bda

@Mergifyio backport stable/10.0

ton31337 avatar May 03 '24 12:05 ton31337

backport stable/10.0

✅ Backports have been created

mergify[bot] avatar May 03 '24 12:05 mergify[bot]

@Mergifyio backport stable/9.1 stable/9.0 stable/8.5

ton31337 avatar May 06 '24 07:05 ton31337

backport stable/9.1 stable/9.0 stable/8.5

✅ Backports have been created

mergify[bot] avatar May 06 '24 07:05 mergify[bot]