Skip to content

Commit 5fec4c3

Browse files
committed
[FreeBSD] Add missing getnameinfo() flag values.
This patchs adds missing flag values for getnameinfo() on FreeBSD, the following flags have been added from the FreeBSD tree. /* * Flag values for getnameinfo() */ #define NI_NOFQDN 0x00000001 #define NI_NUMERICHOST 0x00000002 #define NI_NAMEREQD 0x00000004 #define NI_NUMERICSERV 0x00000008 #define NI_DGRAM 0x00000010 #define NI_NUMERICSCOPE 0x00000020 Signed-off-by: Valdemar Erk <valdemar@erk.io>
1 parent 174920c commit 5fec4c3

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

libc-test/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,6 +1740,7 @@ fn test_freebsd(target: &str) {
17401740
| "IP_RECVORIGDSTADDR"
17411741
| "IPV6_ORIGDSTADDR"
17421742
| "IPV6_RECVORIGDSTADDR"
1743+
| "NI_NUMERICSCOPE"
17431744
if Some(11) == freebsd_ver =>
17441745
{
17451746
true
@@ -1765,6 +1766,7 @@ fn test_freebsd(target: &str) {
17651766
| "PD_CLOEXEC"
17661767
| "PD_ALLOWED_AT_FORK"
17671768
| "IP_RSS_LISTEN_BUCKET"
1769+
| "NI_NUMERICSCOPE"
17681770
if Some(10) == freebsd_ver =>
17691771
{
17701772
true

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,13 @@ pub const RLIMIT_UMTXP: ::c_int = 14;
349349
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
350350
pub const RLIM_NLIMITS: ::rlim_t = 15;
351351

352+
pub const NI_NOFQDN: ::c_int = 0x00000001;
353+
pub const NI_NUMERICHOST: ::c_int = 0x00000002;
354+
pub const NI_NAMEREQD: ::c_int = 0x00000004;
355+
pub const NI_NUMERICSERV: ::c_int = 0x00000008;
356+
pub const NI_DGRAM: ::c_int = 0x00000010;
357+
pub const NI_NUMERICSCOPE: ::c_int = 0x00000020;
358+
352359
pub const Q_GETQUOTA: ::c_int = 0x700;
353360
pub const Q_SETQUOTA: ::c_int = 0x800;
354361

0 commit comments

Comments
 (0)