This patch gets rid of
net.c:652:33: warning: incompatible pointer types passing 'int (int, __SOCKADDR_ARG, socklen_t *restrict)', expected 'int (*)(int, struct sockaddr *, socklen_t *)' [-pedantic]
return __get_sock_name(sockfd, getsockname);
^~~~~~~~~~~
when compiling with clang.
* \sa getsockname(2), getpeername(2), parse_url(), getnameinfo(3),
* services(5), nsswitch.conf(5).
*/
-static char *__get_sock_name(int fd, int (*getname)(int, struct sockaddr*,
- socklen_t *))
+static char *__get_sock_name(int fd, typeof(getsockname) getname)
{
struct sockaddr_storage ss;
const struct sockaddr *sa;