Commit 216cc6f1 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Don't declare memset, memcpy, setsockopt or atoi.

Don't try to set SO_DONTLINGER if SO_DONTLINGER is undefined.
Use O_NONBLOCK instead of FNDELAY if FNDELAY is undefined.
parent 561d3b48
......@@ -30,15 +30,15 @@
** External function declarations
extern void *memset(void *, int, int);
extern void *memcpy(void *, const void *, int);
/*extern void *memset(void *, int, int);*/
/*extern void *memcpy(void *, const void *, int);*/
extern int socket(int, int, int);
extern int setsockopt(int, int, int, char *, int);
/*extern int setsockopt(int, int, int, char *, int);*/
extern int listen(int, int);
extern int connect(int, struct sockaddr *, int);
extern int bind(int, struct sockaddr *, int);
extern int close(int);
extern int atoi(const char *str);
/*extern int atoi(const char *str);*/
extern time_t sleep(time_t);
extern int accept(int fd, struct sockaddr *sock, int *len);
......@@ -182,13 +182,19 @@ isc_createtcp(IscSessionConfig *cfg, int fd)
return NULL;
#ifdef FNDELAY
if (fcntl(fd, F_SETFL, res | FNDELAY) == -1)
if (fcntl(fd, F_SETFL, res | O_NONBLOCK) == -1)
return NULL;
setsockopt(fd, SOL_SOCKET, SO_DONTLINGER, 0, 0);
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, 0, 0);
scb = isc_create(cfg, &isc_tcp_funs);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment