Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: improve c-ares version extraction method
this change enhances the version extraction process to handle both literal and macro-based version definitions in c-ares. in 5d53fb6, we extract the c-ares version by looking for `ARES_VERSION_STR` and matching the version numbers in it. as, in c-ares 1.32, the line looks like: ```c #define ARES_VERSION_STR "1.33.0" ``` but this method fails for c-ares 1.33+ due to non-literal `ARES_VERSION_STR` definitionin. as in c-ares 1.33+, it looks like ```c #define ARES_VERSION_STR \ ARES_STRINGIFY(ARES_VERSION_MAJOR) \ "." ARES_STRINGIFY(ARES_VERSION_MINOR) "." ARES_STRINGIFY(ARES_VERSION_PATCH) ``` this fails the parser. and the version number is always empty. in this change, we match the MAJOR, MINOR and PATCH version components separately. this approach increases resilience. after this change, Seastar is able to detect the versions of both c-ares 1.32 and 1.33. Refs 5d53fb6 Signed-off-by: Kefu Chai <[email protected]>
- Loading branch information