aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Makefile26
-rw-r--r--include/arpa/nameser_compat.h18
-rw-r--r--include/dirent.h6
-rw-r--r--include/netdb.h11
-rw-r--r--include/nsswitch.h1
-rw-r--r--include/rpc/auth.h11
-rw-r--r--include/stdlib.h38
-rw-r--r--include/string.h1
8 files changed, 91 insertions, 21 deletions
diff --git a/include/Makefile b/include/Makefile
index 8d847a3a8dd2..643451367b1b 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -43,13 +43,13 @@ LHDRS= aio.h errno.h fcntl.h linker_set.h poll.h stdatomic.h stdint.h \
syslog.h ucontext.h
LDIRS= geom net net80211 netgraph netinet netinet6 \
- netipsec netsmb nfs nfsclient nfsserver sys vm
+ netipsec netlink netsmb nfs nfsclient nfsserver sys vm
LSUBDIRS= dev/acpica dev/agp dev/ciss dev/filemon dev/firewire \
dev/hwpmc dev/hyperv \
dev/ic dev/iicbus dev/io dev/mfi dev/mmc dev/nvme \
dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/pwm \
- dev/smbus dev/speaker dev/tcp_log dev/veriexec dev/vkbd \
+ dev/smbus dev/speaker dev/tcp_log dev/veriexec dev/vkbd dev/wg \
fs/devfs fs/fdescfs fs/msdosfs fs/nfs fs/nullfs \
fs/procfs fs/smbfs fs/udf fs/unionfs \
geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \
@@ -61,6 +61,7 @@ LSUBDIRS= dev/acpica dev/agp dev/ciss dev/filemon dev/firewire \
netinet/cc \
netinet/netdump \
netinet/tcp_stacks \
+ netlink/route \
security/mac_biba security/mac_bsdextended security/mac_lomac \
security/mac_mls security/mac_partition \
security/mac_veriexec \
@@ -224,6 +225,10 @@ NVPAIRDIR= ${INCLUDEDIR}/sys
MLX5= mlx5io.h
MLX5DIR= ${INCLUDEDIR}/dev/mlx5
+.PATH: ${SRCTOP}/sys/dev/wg
+WG= if_wg.h
+WGDIR= ${INCLUDEDIR}/dev/wg
+
INCSGROUPS= INCS \
ACPICA \
AGP \
@@ -243,7 +248,8 @@ INCSGROUPS= INCS \
RPC \
SECAUDIT \
TEKEN \
- VERIEXEC
+ VERIEXEC \
+ WG
.if ${MK_IPFILTER} != "no"
INCSGROUPS+= IPFILTER
@@ -352,29 +358,29 @@ copies: .PHONY .META
-name "*.h" -print -delete || true
.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/evdev:Ndev/hid:Ndev/hyperv:Ndev/pci:Ndev/veriexec} ${LSUBSUBDIRS}
cd ${SRCTOP}/sys; \
- ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \
+ ${INSTALL} -C ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \
${SDESTDIR}${INCLUDEDIR}/$i
.endfor
cd ${SRCTOP}/sys/${MACHINE}/include; \
- ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
+ ${INSTALL} -C ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
${SDESTDIR}${INCLUDEDIR}/machine
.if exists(${SRCTOP}/sys/${MACHINE}/include/pc)
cd ${SRCTOP}/sys/${MACHINE}/include/pc; \
- ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
+ ${INSTALL} -C ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
${SDESTDIR}${INCLUDEDIR}/machine/pc
.endif
.for _MARCH in ${_MARCHS}
.if exists(${SRCTOP}/sys/${_MARCH}/include)
- ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
+ ${INSTALL} -d ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 755 \
${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \
cd ${SRCTOP}/sys/${_MARCH}/include; \
- ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
+ ${INSTALL} -C ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
${SDESTDIR}${INCLUDEDIR}/${_MARCH}
.if exists(${SRCTOP}/sys/${_MARCH}/include/pc)
- ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
+ ${INSTALL} -d ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 755 \
${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \
cd ${SRCTOP}/sys/${_MARCH}/include/pc; \
- ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
+ ${INSTALL} -C ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc
.endif
.endif
diff --git a/include/arpa/nameser_compat.h b/include/arpa/nameser_compat.h
index 7562984ab0ff..d70bc199b823 100644
--- a/include/arpa/nameser_compat.h
+++ b/include/arpa/nameser_compat.h
@@ -177,15 +177,33 @@ typedef struct {
#define T_SRV ns_t_srv
#define T_ATMA ns_t_atma
#define T_NAPTR ns_t_naptr
+#define T_KX ns_t_kx
+#define T_CERT ns_t_cert
#define T_A6 ns_t_a6
#define T_DNAME ns_t_dname
+#define T_SINK ns_t_sink
#define T_OPT ns_t_opt
+#define T_APL ns_t_apl
+#define T_DS ns_t_ds
+#define T_SSHFP ns_t_sshfp
+#define T_IPSECKEY ns_t_ipseckey
+#define T_RRSIG ns_t_rrsig
+#define T_NSEC ns_t_nsec
+#define T_DNSKEY ns_t_dnskey
+#define T_DHCID ns_t_dhcid
+#define T_NSEC3 ns_t_nsec3
+#define T_NSEC3PARAM ns_t_nsec3param
+#define T_HIP ns_t_hip
+#define T_SPF ns_t_spf
+#define T_TKEY ns_t_tkey
#define T_TSIG ns_t_tsig
#define T_IXFR ns_t_ixfr
#define T_AXFR ns_t_axfr
#define T_MAILB ns_t_mailb
#define T_MAILA ns_t_maila
#define T_ANY ns_t_any
+#define T_ZXFR ns_t_zxfr
+#define T_DLV ns_t_dlv
#define C_IN ns_c_in
#define C_CHAOS ns_c_chaos
diff --git a/include/dirent.h b/include/dirent.h
index 702153e28fc0..751a016838c0 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -108,6 +108,7 @@ int alphasort(const struct dirent **, const struct dirent **);
int dirfd(DIR *);
#endif
#if __BSD_VISIBLE
+int versionsort(const struct dirent **, const struct dirent **);
DIR *__opendir2(const char *, int);
int fdclosedir(DIR *);
ssize_t getdents(int, char *, size_t);
@@ -131,6 +132,11 @@ int scandir_b(const char *, struct dirent ***,
int (^)(const struct dirent **, const struct dirent **));
#endif
#endif
+#if __BSD_VISIBLE
+int scandirat(int, const char *, struct dirent ***,
+ int (*)(const struct dirent *), int (*)(const struct dirent **,
+ const struct dirent **));
+#endif
#if __XSI_VISIBLE
void seekdir(DIR *, long);
long telldir(DIR *);
diff --git a/include/netdb.h b/include/netdb.h
index 731e7f7376b5..7eba378482a1 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -161,8 +161,8 @@ struct addrinfo {
/*
* Error return codes from gai_strerror(3), see RFC 3493.
*/
-#if 0
-/* Obsoleted on RFC 2553bis-02 */
+#if __BSD_VISIBLE /* not in POSIX */
+/* EAI_ADDRFAMILY was obsoleted by RFC 3493, used as extension */
#define EAI_ADDRFAMILY 1 /* address family for hostname not supported */
#endif
#define EAI_AGAIN 2 /* name could not be resolved at this time */
@@ -170,17 +170,20 @@ struct addrinfo {
#define EAI_FAIL 4 /* non-recoverable failure in name resolution */
#define EAI_FAMILY 5 /* address family not recognized */
#define EAI_MEMORY 6 /* memory allocation failure */
-#if 0
-/* Obsoleted on RFC 2553bis-02 */
+#if __BSD_VISIBLE /* not in POSIX */
+/* EAI_NODATA was obsoleted by RFC 3493, retained here as extension */
#define EAI_NODATA 7 /* no address associated with hostname */
#endif
#define EAI_NONAME 8 /* name does not resolve */
#define EAI_SERVICE 9 /* service not recognized for socket type */
#define EAI_SOCKTYPE 10 /* intended socket type was not recognized */
#define EAI_SYSTEM 11 /* system error returned in errno */
+#if __BSD_VISIBLE /* not in POSIX */
+/* The following 3 are not in RFC 3493 or POSIX, retained for compatibility */
#define EAI_BADHINTS 12 /* invalid value for hints */
#define EAI_PROTOCOL 13 /* resolved protocol is unknown */
#define EAI_OVERFLOW 14 /* argument buffer overflow */
+#endif
#define EAI_MAX 15
/*
diff --git a/include/nsswitch.h b/include/nsswitch.h
index f7131292dd78..2be7a59fd1b9 100644
--- a/include/nsswitch.h
+++ b/include/nsswitch.h
@@ -53,6 +53,7 @@
#define NS_NOTFOUND (1<<2) /* source responded 'no such entry' */
#define NS_TRYAGAIN (1<<3) /* source busy, may respond to retry */
#define NS_RETURN (1<<4) /* stop search, e.g. for ERANGE */
+#define NS_ADDRFAMILY (1<<5) /* no addr for fam, getaddrinfo only */
#define NS_TERMINATE (NS_SUCCESS|NS_RETURN) /* flags that end search */
#define NS_STATUSMASK 0x000000ff /* bitmask to get the status flags */
diff --git a/include/rpc/auth.h b/include/rpc/auth.h
index bf0d76c046c6..8773e7115d12 100644
--- a/include/rpc/auth.h
+++ b/include/rpc/auth.h
@@ -279,11 +279,12 @@ __END_DECLS
* Netname manipulation routines.
*/
__BEGIN_DECLS
-extern int getnetname(char *);
-extern int host2netname(char *, const char *, const char *);
-extern int user2netname(char *, const uid_t, const char *);
-extern int netname2user(char *, uid_t *, gid_t *, int *, gid_t *);
-extern int netname2host(char *, char *, const int);
+extern int getnetname(char [MAXNETNAMELEN + 1]);
+extern int host2netname(char [MAXNETNAMELEN + 1], const char *, const char *);
+extern int user2netname(char [MAXNETNAMELEN + 1], const uid_t, const char *);
+extern int netname2user(char [MAXNETNAMELEN + 1], uid_t *, gid_t *, int *,
+ gid_t *);
+extern int netname2host(char [MAXNETNAMELEN + 1], char *, const int);
extern void passwd2des ( char *, char * );
__END_DECLS
diff --git a/include/stdlib.h b/include/stdlib.h
index bf1a612190ee..754e8f5f5fd4 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -311,8 +311,8 @@ int mergesort_b(void *, size_t, size_t, int (^)(const void *, const void *));
int mkostemp(char *, int);
int mkostemps(char *, int, int);
int mkostempsat(int, char *, int, int);
-void qsort_r(void *, size_t, size_t, void *,
- int (*)(void *, const void *, const void *));
+void qsort_r(void *, size_t, size_t,
+ int (*)(const void *, const void *, void *), void *);
int radixsort(const unsigned char **, int, const unsigned char *,
unsigned);
void *reallocarray(void *, size_t, size_t) __result_use_check
@@ -332,6 +332,40 @@ __int64_t
__uint64_t
strtouq(const char *, char **, int);
+/*
+ * In FreeBSD 14, the prototype of qsort_r() was modified to comply with
+ * POSIX. The standardized qsort_r()'s order of last two parameters was
+ * changed, and the comparator function is now taking thunk as its last
+ * parameter, and both are different from the ones expected by the historical
+ * FreeBSD qsort_r() interface.
+ *
+ * Apply a workaround where we explicitly link against the historical
+ * interface, qsort_r@FBSD_1.0, in case when qsort_r() is called with
+ * the last parameter with a function pointer that exactly matches the
+ * historical FreeBSD qsort_r() comparator signature, so applications
+ * written for the historical interface can continue to work without
+ * modification.
+ */
+#if defined(__generic) || defined(__cplusplus)
+void __qsort_r_compat(void *, size_t, size_t, void *,
+ int (*)(void *, const void *, const void *));
+__sym_compat(qsort_r, __qsort_r_compat, FBSD_1.0);
+#endif
+#if defined(__generic) && !defined(__cplusplus)
+#define qsort_r(base, nel, width, arg4, arg5) \
+ __generic(arg5, int (*)(void *, const void *, const void *), \
+ __qsort_r_compat, qsort_r)(base, nel, width, arg4, arg5)
+#elif defined(__cplusplus)
+__END_DECLS
+extern "C++" {
+static inline void qsort_r(void *base, size_t nmemb, size_t size,
+ void *thunk, int (*compar)(void *, const void *, const void *)) {
+ __qsort_r_compat(base, nmemb, size, thunk, compar);
+}
+}
+__BEGIN_DECLS
+#endif
+
extern char *suboptarg; /* getsubopt(3) external variable */
#endif /* __BSD_VISIBLE */
diff --git a/include/string.h b/include/string.h
index 15d4dc7e9701..dc5756830208 100644
--- a/include/string.h
+++ b/include/string.h
@@ -81,6 +81,7 @@ char *strcat(char * __restrict, const char * __restrict);
char *strchr(const char *, int) __pure;
#if __BSD_VISIBLE
char *strchrnul(const char*, int) __pure;
+int strverscmp(const char *, const char *) __pure;
#endif
int strcmp(const char *, const char *) __pure;
int strcoll(const char *, const char *);