View Issue Details

IDProjectCategoryView StatusLast Update
0008852GNUnetotherpublic2024-06-08 16:36
Reporterbnkemt Assigned Toschanzen  
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 12: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 13: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 16: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.

Related Changesets

gnunet: master 98c58ead

2024-05-16 15:00

schanzen


Details Diff
UTIL: Properly detect getaddrinfo in meson. Issue 0008852 Affected Issues
0008852
mod - meson.build Diff File

Issue History

Date Modified Username Field Change
2024-05-16 07:26 bnkemt New Issue
2024-05-16 12:53 schanzen Assigned To => schanzen
2024-05-16 12:53 schanzen Status new => acknowledged
2024-05-16 12:53 schanzen Note Added: 0022433
2024-05-16 13:00 schanzen Changeset attached => gnunet master 98c58ead
2024-05-16 13:00 schanzen Note Added: 0022434
2024-06-08 16:36 schanzen Status acknowledged => resolved
2024-06-08 16:36 schanzen Resolution open => fixed
2024-06-08 16:36 schanzen Fixed in Version => 0.21.2
2024-06-08 16:36 schanzen Note Added: 0022561
2024-06-08 16:36 schanzen Status resolved => closed