summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/net/getaddrinfo.c16
-rw-r--r--lib/libc/sys/posix_fadvise.212
2 files changed, 16 insertions, 12 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c
index 8b47aef..95c588b 100644
--- a/lib/libc/net/getaddrinfo.c
+++ b/lib/libc/net/getaddrinfo.c
@@ -168,12 +168,6 @@ struct explore {
};
static const struct explore explore[] = {
- { PF_LOCAL, SOCK_DGRAM, ANY,
- AF_ANY | PROTOCOL_ANY },
- { PF_LOCAL, SOCK_STREAM, ANY,
- AF_ANY | PROTOCOL_ANY },
- { PF_LOCAL, SOCK_SEQPACKET, ANY,
- AF_ANY | PROTOCOL_ANY },
#ifdef INET6
{ PF_INET6, SOCK_DGRAM, IPPROTO_UDP,
AF_ANY | SOCKTYPE_ANY | PROTOCOL_ANY },
@@ -200,6 +194,12 @@ static const struct explore explore[] = {
AF_ANY | SOCKTYPE_ANY },
{ PF_INET, SOCK_RAW, ANY,
AF_ANY | PROTOCOL_ANY },
+ { PF_LOCAL, SOCK_DGRAM, ANY,
+ AF_ANY | SOCKTYPE_ANY | PROTOCOL_ANY },
+ { PF_LOCAL, SOCK_STREAM, ANY,
+ AF_ANY | SOCKTYPE_ANY | PROTOCOL_ANY },
+ { PF_LOCAL, SOCK_SEQPACKET, ANY,
+ AF_ANY | SOCKTYPE_ANY | PROTOCOL_ANY },
{ -1, 0, 0, 0 },
};
@@ -1245,7 +1245,9 @@ explore_numeric(const struct addrinfo *pai, const char *hostname,
if (pai->ai_family == afd->a_af) {
GET_AI(ai, afd, p);
GET_PORT(ai, servname);
- if ((pai->ai_flags & AI_CANONNAME)) {
+ if ((pai->ai_family == AF_INET ||
+ pai->ai_family == AF_INET6) &&
+ (pai->ai_flags & AI_CANONNAME)) {
/*
* Set the numeric address itself as the canonical
* name, based on a clarification in RFC3493.
diff --git a/lib/libc/sys/posix_fadvise.2 b/lib/libc/sys/posix_fadvise.2
index 8691f6b..641bc9b 100644
--- a/lib/libc/sys/posix_fadvise.2
+++ b/lib/libc/sys/posix_fadvise.2
@@ -28,7 +28,7 @@
.\" @(#)madvise.2 8.1 (Berkeley) 6/9/93
.\" $FreeBSD$
.\"
-.Dd January 30, 2014
+.Dd October 3, 2015
.Dt POSIX_FADVISE 2
.Os
.Sh NAME
@@ -89,11 +89,13 @@ read or written.
Future access to this data may require a read operation.
.El
.Sh RETURN VALUES
-.Rv -std posix_fadvise
-.Sh ERRORS
-The
+If successful,
.Fn posix_fadvise
-system call returns zero on success, and an error on failure:
+returns zero.
+It returns an error on failure, without setting
+.Va errno .
+.Sh ERRORS
+Possible failure conditions:
.Bl -tag -width Er
.It Bq Er EBADF
The
OpenPOWER on IntegriCloud