mirror of
https://github.com/bazel-contrib/rules_foreign_cc
synced 2024-11-27 02:43:28 +00:00
be14ccaec5
Co-authored-by: James Sharpe <james.sharpe@zenotech.com>
16 lines
359 B
C++
16 lines
359 B
C++
#include "ares.h"
|
|
|
|
#include <iostream>
|
|
#include <stdexcept>
|
|
#include <string.h>
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
int version = 0;
|
|
const char* strVersion = ares_version(&version);
|
|
if (strcmp(strVersion, "1.14.0") != 0) {
|
|
throw std::runtime_error("Wrong version: " + std::string(strVersion));
|
|
}
|
|
std::cout << "C-ares version: " << strVersion;
|
|
}
|