diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/net/getaddrinfo.c | 16 | ||||
-rw-r--r-- | lib/libc/sys/posix_fadvise.2 | 12 | ||||
-rw-r--r-- | lib/libohash/ohash.h | 2 | ||||
-rw-r--r-- | lib/libusb/Makefile | 4 | ||||
-rw-r--r-- | lib/libz/Makefile | 2 |
5 files changed, 20 insertions, 16 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 diff --git a/lib/libohash/ohash.h b/lib/libohash/ohash.h index 03de431..ff21c85 100644 --- a/lib/libohash/ohash.h +++ b/lib/libohash/ohash.h @@ -20,6 +20,8 @@ #ifndef OHASH_H #define OHASH_H +#include <stddef.h> + /* Open hashing support. * Open hashing was chosen because it is much lighter than other hash * techniques, and more efficient in most cases. diff --git a/lib/libusb/Makefile b/lib/libusb/Makefile index 25d886a..be55aa6 100644 --- a/lib/libusb/Makefile +++ b/lib/libusb/Makefile @@ -35,10 +35,10 @@ SRCS+= libusb10_io.c .if defined(COMPAT_32BIT) CFLAGS+= -DCOMPAT_32BIT -.else +.endif + FILES= libusb-0.1.pc libusb-1.0.pc libusb-2.0.pc FILESDIR= ${LIBDATADIR}/pkgconfig -.endif # # Cross platform support diff --git a/lib/libz/Makefile b/lib/libz/Makefile index aed4ee3..7a80fcb 100644 --- a/lib/libz/Makefile +++ b/lib/libz/Makefile @@ -68,10 +68,8 @@ test: example minigzip (export LD_LIBRARY_PATH=. ; \ echo hello world | ./minigzip | ./minigzip -d ) -.ifndef COMPAT_32BIT FILES= zlib.pc FILESDIR= ${LIBDATADIR}/pkgconfig -.endif .include <bsd.lib.mk> |