Skip to content

Commit 90ebf43

Browse files
committed
Auto merge of #2485 - DimitrisJim:freebsd_ai_consts, r=Amanieu
Add AI_* constants to freebdslike platforms. For dragonfly, some of the constants (`AI_MASK`, `AI_V4MAPPED_CFG` and `AI_DEFAULT`) are behind a `__BSD_VISIBLE` define. What's the best way to handle these? Header files for [dragonfly](https://git.quantumachine.net/mirror/DragonFlyBSD/src/branch/master/include/netdb.h) and [freebsd](https://cgit.freebsd.org/src/tree/include/netdb.h). For now, I've just added all common names to `freebdslike`.
2 parents 5fe832a + a5da2c2 commit 90ebf43

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

libc-test/semver/freebsd.txt

+7
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ AIO_ALLDONE
5555
AIO_CANCELED
5656
AIO_LISTIO_MAX
5757
AIO_NOTCANCELED
58+
AI_PASSIVE
59+
AI_CANONNAME
60+
AI_NUMERICHOST
61+
AI_NUMERICSERV
62+
AI_ALL
63+
AI_ADDRCONFIG
64+
AI_V4MAPPED
5865
ALTMON_1
5966
ALTMON_10
6067
ALTMON_11

src/unix/bsd/freebsdlike/mod.rs

+8
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,14 @@ pub const POLLSTANDARD: ::c_short = ::POLLIN
724724
| ::POLLHUP
725725
| ::POLLNVAL;
726726

727+
pub const AI_PASSIVE: ::c_int = 0x00000001;
728+
pub const AI_CANONNAME: ::c_int = 0x00000002;
729+
pub const AI_NUMERICHOST: ::c_int = 0x00000004;
730+
pub const AI_NUMERICSERV: ::c_int = 0x00000008;
731+
pub const AI_ALL: ::c_int = 0x00000100;
732+
pub const AI_ADDRCONFIG: ::c_int = 0x00000400;
733+
pub const AI_V4MAPPED: ::c_int = 0x00000800;
734+
727735
pub const EAI_AGAIN: ::c_int = 2;
728736
pub const EAI_BADFLAGS: ::c_int = 3;
729737
pub const EAI_FAIL: ::c_int = 4;

0 commit comments

Comments
 (0)