mirror of https://gerrit.osmocom.org/libosmocore
socket.c: build multiaddr socket API helpers only if used by public APIs
Those two functions are only used by osmo_sock_init2_multiaddr(), which is only built if HAVE_LIBSCTP is defined. Avoid compiler warning about unusued function helpers if osmo_sock_init2_multiaddr() is not being built. Change-Id: I52769d6b8f70af1a8bda23d60b3230a932e71fab
This commit is contained in:
parent
80c8a1d281
commit
8fac511a6e
|
@ -100,6 +100,7 @@ static struct addrinfo *addrinfo_helper(uint16_t family, uint16_t type, uint8_t
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBSCTP
|
||||||
/*! Retrieve an array of addrinfo with specified hints, one for each host in the hosts array.
|
/*! Retrieve an array of addrinfo with specified hints, one for each host in the hosts array.
|
||||||
* \param[out] addrinfo array of addrinfo pointers, will be filled by the function on success.
|
* \param[out] addrinfo array of addrinfo pointers, will be filled by the function on success.
|
||||||
* Its size must be at least the one of hosts.
|
* Its size must be at least the one of hosts.
|
||||||
|
@ -127,6 +128,7 @@ static int addrinfo_helper_multi(struct addrinfo **addrinfo, uint16_t family, ui
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif /* HAVE_LIBSCTP*/
|
||||||
|
|
||||||
static int socket_helper(const struct addrinfo *rp, unsigned int flags)
|
static int socket_helper(const struct addrinfo *rp, unsigned int flags)
|
||||||
{
|
{
|
||||||
|
@ -150,6 +152,7 @@ static int socket_helper(const struct addrinfo *rp, unsigned int flags)
|
||||||
return sfd;
|
return sfd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBSCTP
|
||||||
/* Fill buf with a string representation of the address set, in the form:
|
/* Fill buf with a string representation of the address set, in the form:
|
||||||
* buf_len == 0: "()"
|
* buf_len == 0: "()"
|
||||||
* buf_len == 1: "hostA"
|
* buf_len == 1: "hostA"
|
||||||
|
@ -181,6 +184,7 @@ static int multiaddr_snprintf(char* buf, size_t buf_len, const char **hosts, siz
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
#endif /* HAVE_LIBSCTP */
|
||||||
|
|
||||||
static int osmo_sock_init_tail(int fd, uint16_t type, unsigned int flags)
|
static int osmo_sock_init_tail(int fd, uint16_t type, unsigned int flags)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue