Use socklen_t where available.

Patch from <Pascal.Stumpf@cubes.de>

This should use socklen_t where available, really ...
This commit is contained in:
Jon Trulson
2012-08-09 12:27:58 -06:00
parent 686bcfadc7
commit 1f332de27b
3 changed files with 14 additions and 2 deletions

View File

@@ -172,8 +172,12 @@ init(int init_as_source)
t_strerror( t_errno ) );
return 0;
}
#else
#if defined(linux) || defined(CSRG_BASED)
socklen_t len;
#else
int len;
#endif
int optval;
_sock = socket(AF_INET, SOCK_STREAM, 0);
if (_sock < 0) {
@@ -439,7 +443,11 @@ accept()
{
if (_msgsock == -1) {
#ifndef OPT_TLI
#if defined(linux) || defined(CSRG_BASED)
socklen_t addrlen = sizeof(sockaddr_in);
#else
int addrlen = sizeof(sockaddr_in);
#endif
sockaddr_in saddr;
#if defined(_AIX) && (OSMAJORVERSION==4) && (OSMINORVERSION==2)