1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

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

@ -217,7 +217,7 @@ main(int argc, char** argv, char **envp)
#if defined(DEC) || defined(sun) || defined(HPUX)
int asize = sizeof(struct sockaddr);
#else
# if defined(linux)
# if defined(linux) || defined(CSRG_BASED)
socklen_t asize;
# else
size_t asize = sizeof(struct sockaddr);
@ -484,7 +484,7 @@ main(int argc, char** argv, char **envp)
if (!_tt_debug_mode) {
if (0!=fork()) exit(0);
#ifdef __osf__
#if defined(__osf__) || defined(CSRG_BASED)
setsid();
#else
setpgrp();

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)

View file

@ -355,7 +355,11 @@ gettransient(int proto, int vers, int *sockp)
#ifndef OPT_TLI
int found;
int s;
#if defined(linux) || defined(CSRG_BASED)
socklen_t len;
#else
int len;
#endif
int socktype;
sockaddr_in addr;
sockaddr_in tport;