[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#194300: libc6-dev: 4th argument of inet_ntop() should have type size_t, not socklen_t



Package: libc6-dev
Version: 2.3.1-17
Severity: normal

In /usr/include/arpa/inet.h:

/* Convert a Internet address in binary network format for interface
   type AF in buffer starting at CP to presentation form and place
   result in buffer of length LEN astarting at BUF.  */
extern __const char *inet_ntop (int __af, __const void *__restrict __cp,
                                char *__restrict __buf, socklen_t __len)
     __THROW;

>From the manpage:

SYNOPSIS
       #include <sys/types.h>
       #include <sys/socket.h>
       #include <arpa/inet.h>

       const char *inet_ntop(int af, const void *src,
                             char *dst, size_t cnt);

The last argument, cnt, is the size of the buffer dst, so it should
indeed have type size_t, not socklen_t. Because of this the package vic
FTBFS on architectures where sizeof(size_t) != sizeof(socklen_t).

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux haplo 2.4.20 #1 Sun Dec 1 14:03:28 CET 2002 i686
Locale: LANG=nl_NL.UTF-8, LC_CTYPE=nl_NL.UTF-8 (ignored: LC_ALL set)

Versions of packages libc6-dev depends on:
ii  libc6                         2.3.1-17   GNU C Library: Shared libraries an

-- no debconf information




Reply to: