diff options
| author | Laytan Laats <laytanlaats@hotmail.com> | 2025-04-05 15:53:11 +0200 |
|---|---|---|
| committer | Laytan Laats <laytanlaats@hotmail.com> | 2025-04-05 17:35:19 +0200 |
| commit | ff7d55a8e1ab8fd031378d9994f4aaf8394e7255 (patch) | |
| tree | 78e4dab5313eed54d40496f2aaa195972ff69347 /core/net/interface_freebsd.odin | |
| parent | f796b67a67bdd316ecf830b13cbd43fed7c0a64b (diff) | |
net: rework errors to be cross-platform
Diffstat (limited to 'core/net/interface_freebsd.odin')
| -rw-r--r-- | core/net/interface_freebsd.odin | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/net/interface_freebsd.odin b/core/net/interface_freebsd.odin index 50e2d1a96..90a538a04 100644 --- a/core/net/interface_freebsd.odin +++ b/core/net/interface_freebsd.odin @@ -25,7 +25,7 @@ import "core:strings" import "core:sys/freebsd" @(private) -_enumerate_interfaces :: proc(allocator := context.allocator) -> (interfaces: []Network_Interface, err: Network_Error) { +_enumerate_interfaces :: proc(allocator := context.allocator) -> (interfaces: []Network_Interface, err: Interfaces_Error) { // This is a simplified implementation of `getifaddrs` from the FreeBSD // libc using only Odin and syscalls. context.allocator = allocator @@ -50,7 +50,7 @@ _enumerate_interfaces :: proc(allocator := context.allocator) -> (interfaces: [] // Allocate and get the entries. buf, alloc_err := make([]byte, needed) if alloc_err != nil { - return nil, .Unable_To_Enumerate_Network_Interfaces + return nil, .Allocation_Failure } defer delete(buf) |