This commit is contained in:
ge
2026-04-29 22:22:54 +03:00
parent 9972b3e18f
commit 57cf5edefd
3 changed files with 20 additions and 2 deletions
+3 -1
View File
@@ -4,6 +4,8 @@ module protocol
import os
import sync
#include <netdb.h>
// Mutex for accessing to protocol entries via getprotoent(3).
__global netio_proto_mutex &sync.Mutex
@@ -35,7 +37,7 @@ pub:
number int // The protocol number.
}
fn make_proto(ent C.protoent) ProtocolEntry {
fn make_proto(ent &C.protoent) ProtocolEntry {
mut aliases := []string{}
if unsafe { ent.p_aliases[0] != nil } {
mut ptr := *ent.p_aliases