Red Bear OS
0b5d0aca97
fix(netdb): use relibc types in freeaddrinfo fallback
2026-07-08 21:29:56 +03:00
Red Bear OS
a3981d1d7f
fix(netdb): remove stray closing brace in freeaddrinfo
2026-07-08 21:21:04 +03:00
Red Bear OS
285eedfab8
relibc: fix freeaddrinfo memory leak for unknown address lengths
...
Previously when getaddrinfo returned an addrinfo with an
ai_addrlen that didn't match sockaddr_in or sockaddr_in6, the
allocation was leaked (the function logged a TODO and returned
without freeing the address).
Now handles:
- sockaddr_un (Unix domain socket addresses)
- ai_addrlen=0 (no address to free)
- Unknown sizes (free as raw allocation to prevent leak)
The raw dealloc uses the address length as the size with
sa_family_t alignment, which is sufficient for any address
family's alignment requirements.
2026-07-08 21:15:31 +03:00
vasilito
4ef7e57571
0.3.0: converge relibc to upstream 0.6.0 + Red Bear patches
2026-07-06 19:13:57 +03:00
oddcoder
37a462de5d
Apply cargo fmt to the whole repo
2020-07-19 21:27:38 +02:00
jD91mZM2
593925ceb4
Unambiguate all include guards
...
GNU binutils also uses _FNMATCH_H for a guard, maybe along others!
2020-06-29 11:34:51 +02:00
Giuseppe Longo
12beb13987
netdb: implement getnetbynane and getnetent
...
This patch implements getnetbyname and getnetent functions.
2020-06-07 14:02:41 +02:00
AdminXVII
884ec85838
Replace occurences of uninitialized with MaybeUninit
...
mem::uninitialized is deprecated, so move over the not-UB MaybeUninit.
2020-01-20 16:54:22 +00:00
jD91mZM2
b8c50c7c64
Format
2019-08-04 19:05:45 +02:00
jD91mZM2
c7d499d4f2
Upgrade to the 2018 edition
...
I didn't think it'd be this useful first, but thank god for `cargo fix --edition`!
2019-08-04 19:05:45 +02:00
Mateusz Mikuła
63a1319e50
Cbindgen update
2019-07-10 10:08:39 +00:00
Mateusz Mikuła
7597c082e7
Fix Clippy warnings
2019-05-11 22:34:13 +02:00
Jeremy Soller
7bde036031
Remove va_list submodule, format
2019-04-21 15:45:55 -06:00
jD91mZM2
6d4ac9dba8
Finally, get rid of all rust warnings
...
Just a small step along the way to reduce the massive wall of spam
every time you compile.
This was done partly automagically with `cargo fix`. The rest was me
deleting or commenting out a bunch of variables. Hope nothing was
important...
2019-04-21 21:12:16 +02:00
Jeremy Soller
f4c036c3aa
Fix returning incorrect ai_socktype from getaddrinfo
2019-04-01 20:34:53 -06:00
Jeremy Soller
38da5552e8
getaddrinfo: support for setting port from service argument (numeric only)
2019-02-02 14:20:26 -07:00
Jeremy Soller
c59f268fcd
Implement getaddrinfo (somewhat)
2019-01-21 20:36:56 -07:00
Jeremy Soller
f25c494a73
Show hint information
2019-01-20 20:12:58 -07:00
Jeremy Soller
047deceed0
Move hostent functions to separate file
2019-01-17 20:45:25 -07:00
Jeremy Soller
d0261ebb35
Move db to crate root
2019-01-17 19:56:51 -07:00
Jeremy Soller
c71088e768
Cleanup and format
2019-01-14 21:07:24 -07:00
Jeremy Soller
8dabff129a
Begin work on getnameinfo
2019-01-14 19:26:35 -07:00
Jeremy Soller
594e53c6f1
addrinfo stub
2019-01-13 14:37:20 -07:00
Jeremy Soller
6c0c6dd71b
Fix missing negative flags in netdb.h, add NI_MAXHOST and NI_MAXSERV
2019-01-13 10:34:17 -07:00
Jeremy Soller
018ff409f1
Add gai_strerror
2019-01-13 10:24:30 -07:00
Jeremy Soller
543f32eb50
Add nameinfo defines
2019-01-13 10:24:17 -07:00
Jeremy Soller
97312c9ae2
Fix addrinfo structure
2019-01-13 10:13:25 -07:00
Jeremy Soller
84fcb1b906
Add addrinfo constants
2019-01-13 09:58:03 -07:00
Tibor Nagy
51245d69e3
netdb: Return mutable structs in the getter functions
2018-12-18 21:13:32 +01:00
Jeremy Soller
52fd4d7e83
Clippy fixes
2018-12-02 08:04:53 -07:00
Jeremy Soller
0ac16556bc
Format
2018-11-25 10:34:42 -07:00
Jeremy Soller
c6f2b30738
Add netdb bits to include hostent.h_addr
2018-11-17 08:16:37 -07:00
Jeremy Soller
ebffc977b2
Reduce warnings
2018-11-10 07:52:45 -07:00
Jeremy Soller
39b999ccea
Update to new rust-toolchain
2018-11-07 20:25:21 -07:00
Benedikt Rascher-Friesenhausen
49259d3f01
Don't drop the host aliases pointer vector in gethostent
...
There are pointers to this vector in `HOST_ENTRY` so we must keep it around for
as long as `HOST_ENTRY` exists.
2018-10-11 20:59:54 +02:00
jD91mZM2
0451fac66c
Delete RawFile in favor of File
2018-09-26 19:40:39 +02:00
Jeremy Soller
7f14fcdee0
Remove c_str functions, replace with CStr
2018-09-24 21:08:29 -06:00
jD91mZM2
2aa7597a2b
Fix network problem with netdb on redox
2018-09-18 19:14:28 +02:00
Jeremy Soller
76959416bb
Add missing open flags
2018-09-17 09:59:41 -06:00
Jeremy Soller
716ea87bb4
Format
2018-09-17 09:46:47 -06:00
jD91mZM2
882b86e282
Revert 'fix netdb on names with spaces', just ignore invalid lines
2018-09-05 19:24:10 +02:00
jD91mZM2
49ccf364c2
Fix netdb getservbyname on names with spaces
2018-09-05 17:38:59 +02:00
jD91mZM2
26f953e11f
Run fmt.sh
2018-09-02 08:17:52 +02:00
jD91mZM2
6fe3e05ea0
Delete duplicate types
...
Now that we use cbindgen differently :D
2018-09-02 08:17:15 +02:00
Paul Sajna
07eb658a8a
Netdb
2018-09-01 14:00:18 +00:00