Skip to content
Success

#28922 (Jul 7, 2026, 1:57:44 PM)

Started 8 hr 55 min ago
Took 3 sec on build4-deb12build-ansible

Started by upstream project gerrit-osmo-sgsn build number 573
originally caused by:

This run spent:

  • 10 sec waiting;
  • 3 sec build duration;
  • 13 sec total from scheduled to completion.
Revision: 782b8a1add3e2a3bc8cbf5d6e37d6a0fd8d18ff2
Repository: $GERRIT_REPO_URL
  • master
Add missing const for struct hostent *hostent

The hostent parameter is supposed to be const. This is being enforced in
c-ares 1.34.7, which is why osmo-sgsn currently fails to build in debian
unstable. The c-ares developers are preparing a new release that reverts
this change to avoid breakage with other users of libc-ares, and only
document that this should basically be const. But let's use the API as
intended so the compiler knows that osmo-sgsn is not supposed to modify
the hostent parameter.

Fix for:

  sgsn_ares.c:141:63: error: passing argument 4 of 'ares_gethostbyname' from incompatible pointer type [-Wincompatible-pointer-types]
    141 |         ares_gethostbyname(sgsn->ares_channel, name, AF_INET, ares_cb, cb_data);
        |                                                               ^~~~~~~
        |                                                               |
        |                                                               void (*)(void *, int,  int,  struct hostent *)
  /usr/include/ares.h:881:22: note: expected 'ares_host_callback' {aka 'void (*)(void *, int,  int,  const struct hostent *)'} but argument is of type 'void (*)(void *, int,  int,  struct hostent *)'

Related: https://github.com/c-ares/c-ares/pull/1060
Related: https://github.com/c-ares/c-ares/pull/1244
Change-Id: Ibe3debc5d3b7af5883001960c40efb296692f93d
Oliver Smith at