[vlc-devel] [PATCH 2/5] configure: define socklen_t to int on OS/2

KO Myung-Hun komh78 at gmail.com
Tue Nov 26 09:44:24 CET 2019



Rémi Denis-Courmont wrote:
> Le tiistaina 19. marraskuuta 2019, 14.39.45 EET Steve Lhomme a écrit :
>> Also it may be better to use socklen_t where it's expected instead of
>> using "unsigned int".
> 
> The question is what is the correct type to define socklen_t with, if it's not 
> defined.
> 
> On one hand, POSIX says it's an integer type with at least 32-bits, and 
> depending on version, unsigned, or unspecified signedness. On the other hand, 
> it must match whatever the pointer type is for the 6th argument of recvfrom(), 
> the 3rd argument of getsockname() and the 3rd argument of getpeername().
> 

These are the declaration in sys/socket.h:

int     TCPCALL getpeername (int, struct sockaddr *, int *);
int     TCPCALL getsockname (int, struct sockaddr *, int *);
int     TCPCALL recvfrom (int, void *, int, int, struct sockaddr *, int *);


-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v6.0.10 on Intel Core i7-3615QM 2.30GHz with 12GB RAM

Korean OS/2 User Community : http://www.os2.kr/



More information about the vlc-devel mailing list