rename INET6_ADDRSTRLEN -> SIGAR_INET6_ADDRSTRLEN
This commit is contained in:
parent
05eb2f8877
commit
f5d84d4f67
@ -319,7 +319,7 @@ JNIEXPORT void SIGAR_JNIx(kill)
|
||||
SetObjectField(env, obj, fieldID, JENV->NewStringUTF(env, val))
|
||||
|
||||
static jstring jnet_address_to_string(JNIEnv *env, sigar_t *sigar, sigar_net_address_t *val) {
|
||||
char addr_str[INET6_ADDRSTRLEN];
|
||||
char addr_str[SIGAR_INET6_ADDRSTRLEN];
|
||||
sigar_net_address_to_string(sigar, val, addr_str);
|
||||
return JENV->NewStringUTF(env, addr_str);
|
||||
}
|
||||
|
@ -429,19 +429,17 @@ SIGAR_DECLARE(int) sigar_net_address_to_string(sigar_t *sigar,
|
||||
|
||||
SIGAR_DECLARE(sigar_uint32_t) sigar_net_address_hash(sigar_net_address_t *address);
|
||||
|
||||
#ifndef INET6_ADDRSTRLEN
|
||||
# define INET6_ADDRSTRLEN 46
|
||||
#endif
|
||||
#define SIGAR_INET6_ADDRSTRLEN 46
|
||||
|
||||
#define SIGAR_MAXDOMAINNAMELEN 256
|
||||
#define SIGAR_MAXHOSTNAMELEN 256
|
||||
|
||||
typedef struct {
|
||||
char default_gateway[INET6_ADDRSTRLEN];
|
||||
char default_gateway[SIGAR_INET6_ADDRSTRLEN];
|
||||
char host_name[SIGAR_MAXHOSTNAMELEN];
|
||||
char domain_name[SIGAR_MAXDOMAINNAMELEN];
|
||||
char primary_dns[INET6_ADDRSTRLEN];
|
||||
char secondary_dns[INET6_ADDRSTRLEN];
|
||||
char primary_dns[SIGAR_INET6_ADDRSTRLEN];
|
||||
char secondary_dns[SIGAR_INET6_ADDRSTRLEN];
|
||||
} sigar_net_info_t;
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
|
@ -1776,7 +1776,7 @@ SIGAR_DECLARE(int) sigar_net_address_to_string(sigar_t *sigar,
|
||||
case SIGAR_AF_INET6:
|
||||
#if defined(__linux__) /*XXX*/
|
||||
if (inet_ntop(AF_INET6, (const void *)&address->addr.in6,
|
||||
addr_str, INET6_ADDRSTRLEN))
|
||||
addr_str, SIGAR_INET6_ADDRSTRLEN))
|
||||
{
|
||||
return SIGAR_OK;
|
||||
}
|
||||
@ -2019,7 +2019,7 @@ SIGAR_DECLARE(int) sigar_fqdn_get(sigar_t *sigar, char *name, int namelen)
|
||||
int i,j;
|
||||
|
||||
for (i=0; p->h_addr_list[i]; i++) {
|
||||
char addr[INET6_ADDRSTRLEN];
|
||||
char addr[SIGAR_INET6_ADDRSTRLEN];
|
||||
struct in_addr *in =
|
||||
(struct in_addr *)p->h_addr_list[i];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user