This commit is contained in:
ge
2026-04-28 23:18:57 +03:00
parent 7b17a4a33b
commit e54f013ef7
11 changed files with 142 additions and 50 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ fn main() {
// Resolve the fully qualified domain name for host.
// This programm is analog for `hostname -f` command.
hostname := os.hostname()!
ai := netio.translate_addr(node: hostname, flags: netio.ai_canonname)!
ai := netio.addr_info(node: hostname, flags: netio.ai_canonname)!
mut fqdn := ''
for a in ai {
// Not needed to iterate over all entries, return the first one per getaddrinfo(3).