View Issue Details

IDProjectCategoryView StatusLast Update
0008852GNUnetotherpublic2024-06-08 14:36
Reporterbnkemt Assigned Toschanzen Due Date
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version0.21.1 
Fixed in Version0.21.2 
Summary0008852: Replace deprecated gethostbyname
Descriptiongethostbyname has been deprecated, replace it by getaddrinfo

gethostbyname is used in:

src/lib/util/resolver_api.c: host = gethostbyname2 (hostname,
src/lib/util/resolver_api.c: host = gethostbyname2 (hostname,
src/lib/util/resolver_api.c: host = gethostbyname (hostname);
src/service/util/test_resolver_api.c: rootserver = gethostbyname (rootserver_name);

src/service/arm/test_gnunet_service_arm.c: host = gethostbyname2 (hostname, AF_INET);
src/service/arm/test_gnunet_service_arm.c: host = gethostbyname2 (hostname, AF_INET6);
src/service/arm/test_gnunet_service_arm.c: host = gethostbyname (hostname);
TagsNo tags attached.

Activities

schanzen

2024-05-16 10:53

administrator   ~0022433

Indeed this is true, we have such calls in the source. BUT, if getaddrinfo exists on the system as syscall. that is used instead if you look at the code.
So the question is how to deal with this nit. We could not fallback if the call itself fails, but I see no advantage in that?

schanzen

2024-05-16 11:00

administrator   ~0022434

Actually I noticed that in meson the detection of getaddrinfo was not implemented. I added this in master.

schanzen

2024-06-08 14:36

administrator   ~0022561

The detection is (back in place) the use of the deprecated just in case the platform does not support a modern API and is ifdef'd out otherwise.

Issue History

Date ModifiedUsernameFieldChange
2024-05-16 05:26bnkemtNew Issue
2024-05-16 10:53schanzenAssigned To => schanzen
2024-05-16 10:53schanzenStatusnew => acknowledged
2024-05-16 10:53schanzenNote Added: 0022433
2024-05-16 11:00schanzen
2024-05-16 11:00schanzenNote Added: 0022434
2024-06-08 14:36schanzenStatusacknowledged => resolved
2024-06-08 14:36schanzenResolutionopen => fixed
2024-06-08 14:36schanzenFixed in Version => 0.21.2
2024-06-08 14:36schanzenNote Added: 0022561
2024-06-08 14:36schanzenStatusresolved => closed