Correct 2nd argument of getnameinfo(3) to socklen_t.
Reviewed by: itojun
This commit is contained in:
parent
97424e48a0
commit
ad9fdc8f4d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=72510
@ -61,8 +61,13 @@
|
|||||||
#ifndef _NETDB_H_
|
#ifndef _NETDB_H_
|
||||||
#define _NETDB_H_
|
#define _NETDB_H_
|
||||||
|
|
||||||
|
#include <machine/ansi.h>
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#include <sys/types.h>
|
|
||||||
|
#ifdef _BSD_SIZE_T_
|
||||||
|
typedef _BSD_SIZE_T_ size_t;
|
||||||
|
#undef _BSD_SIZE_T_
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef _PATH_HEQUIV
|
#ifndef _PATH_HEQUIV
|
||||||
# define _PATH_HEQUIV "/etc/hosts.equiv"
|
# define _PATH_HEQUIV "/etc/hosts.equiv"
|
||||||
@ -192,6 +197,14 @@ struct addrinfo {
|
|||||||
*/
|
*/
|
||||||
#define SCOPE_DELIMITER '%'
|
#define SCOPE_DELIMITER '%'
|
||||||
|
|
||||||
|
/*
|
||||||
|
* data types - basically forward decl for getnameinfo()
|
||||||
|
*/
|
||||||
|
#ifdef _BSD_SOCKLEN_T_
|
||||||
|
typedef _BSD_SOCKLEN_T_ socklen_t;
|
||||||
|
#undef _BSD_SOCKLEN_T_
|
||||||
|
#endif
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
void endhostent __P((void));
|
void endhostent __P((void));
|
||||||
void endnetent __P((void));
|
void endnetent __P((void));
|
||||||
@ -221,7 +234,7 @@ void setnetent __P((int));
|
|||||||
void setprotoent __P((int));
|
void setprotoent __P((int));
|
||||||
int getaddrinfo __P((const char *, const char *,
|
int getaddrinfo __P((const char *, const char *,
|
||||||
const struct addrinfo *, struct addrinfo **));
|
const struct addrinfo *, struct addrinfo **));
|
||||||
int getnameinfo __P((const struct sockaddr *, size_t, char *,
|
int getnameinfo __P((const struct sockaddr *, socklen_t, char *,
|
||||||
size_t, char *, size_t, int));
|
size_t, char *, size_t, int));
|
||||||
void freeaddrinfo __P((struct addrinfo *));
|
void freeaddrinfo __P((struct addrinfo *));
|
||||||
char *gai_strerror __P((int));
|
char *gai_strerror __P((int));
|
||||||
|
@ -98,7 +98,7 @@ static int ip6_sa2str __P((const struct sockaddr_in6 *, char *, size_t, int));
|
|||||||
int
|
int
|
||||||
getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
|
getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
|
||||||
const struct sockaddr *sa;
|
const struct sockaddr *sa;
|
||||||
size_t salen;
|
socklen_t salen;
|
||||||
char *host;
|
char *host;
|
||||||
size_t hostlen;
|
size_t hostlen;
|
||||||
char *serv;
|
char *serv;
|
||||||
|
@ -54,6 +54,7 @@
|
|||||||
#define _BSD_SSIZE_T_ long /* byte count or error */
|
#define _BSD_SSIZE_T_ long /* byte count or error */
|
||||||
#define _BSD_TIME_T_ int /* time() */
|
#define _BSD_TIME_T_ int /* time() */
|
||||||
#define _BSD_TIMER_T_ int /* timer_t */
|
#define _BSD_TIMER_T_ int /* timer_t */
|
||||||
|
#define _BSD_SOCKLEN_T_ __uint32_t /* socklen_t */
|
||||||
|
|
||||||
#if defined __GNUC__ && (__GNUC__ > 2 || __GNUC_MINOR__ > 95)
|
#if defined __GNUC__ && (__GNUC__ > 2 || __GNUC_MINOR__ > 95)
|
||||||
#define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */
|
#define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
#define _BSD_SSIZE_T_ long /* byte count or error */
|
#define _BSD_SSIZE_T_ long /* byte count or error */
|
||||||
#define _BSD_TIME_T_ long /* time() */
|
#define _BSD_TIME_T_ long /* time() */
|
||||||
#define _BSD_TIMER_T_ int /* timer_t */
|
#define _BSD_TIMER_T_ int /* timer_t */
|
||||||
|
#define _BSD_SOCKLEN_T_ __uint32_t /* socklen_t */
|
||||||
|
|
||||||
#if defined __GNUC__ && (__GNUC__ > 2 || __GNUC_MINOR__ > 95)
|
#if defined __GNUC__ && (__GNUC__ > 2 || __GNUC_MINOR__ > 95)
|
||||||
#define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */
|
#define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
#define _BSD_TIME_T_ long /* time()... */
|
#define _BSD_TIME_T_ long /* time()... */
|
||||||
#define _BSD_TIMER_T_ int /* timer_gettime()... */
|
#define _BSD_TIMER_T_ int /* timer_gettime()... */
|
||||||
#define _BSD_WCHAR_T_ _BSD_CT_RUNE_T_ /* wchar_t (see below) */
|
#define _BSD_WCHAR_T_ _BSD_CT_RUNE_T_ /* wchar_t (see below) */
|
||||||
|
#define _BSD_SOCKLEN_T_ __uint32_t /* socklen_t */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Types which are fundamental to the implementation and must be used
|
* Types which are fundamental to the implementation and must be used
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
#define _BSD_VA_LIST_ __builtin_va_list /* va_list */
|
#define _BSD_VA_LIST_ __builtin_va_list /* va_list */
|
||||||
#define _BSD_CLOCKID_T_ int /* clockid_t */
|
#define _BSD_CLOCKID_T_ int /* clockid_t */
|
||||||
#define _BSD_TIMER_T_ int /* timer_t */
|
#define _BSD_TIMER_T_ int /* timer_t */
|
||||||
|
#define _BSD_SOCKLEN_T_ __uint32_t /* socklen_t */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Types which are fundamental to the implementation and must be used
|
* Types which are fundamental to the implementation and must be used
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
#define _BSD_SSIZE_T_ long /* byte count or error */
|
#define _BSD_SSIZE_T_ long /* byte count or error */
|
||||||
#define _BSD_TIME_T_ long /* time() */
|
#define _BSD_TIME_T_ long /* time() */
|
||||||
#define _BSD_TIMER_T_ int /* timer_t */
|
#define _BSD_TIMER_T_ int /* timer_t */
|
||||||
|
#define _BSD_SOCKLEN_T_ __uint32_t /* socklen_t */
|
||||||
|
|
||||||
#if defined __GNUC__ && (__GNUC__ > 2 || __GNUC_MINOR__ > 95)
|
#if defined __GNUC__ && (__GNUC__ > 2 || __GNUC_MINOR__ > 95)
|
||||||
#define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */
|
#define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */
|
||||||
|
@ -48,8 +48,13 @@
|
|||||||
/*
|
/*
|
||||||
* Data types.
|
* Data types.
|
||||||
*/
|
*/
|
||||||
|
#include <machine/ansi.h>
|
||||||
|
|
||||||
typedef u_char sa_family_t;
|
typedef u_char sa_family_t;
|
||||||
typedef u_int32_t socklen_t;
|
#ifdef _BSD_SOCKLEN_T_
|
||||||
|
typedef _BSD_SOCKLEN_T_ socklen_t;
|
||||||
|
#undef _BSD_SOCKLEN_T_
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Types
|
* Types
|
||||||
|
Loading…
Reference in New Issue
Block a user