Posted by
| Nick Gammon
Australia (22,973 posts) bio
Forum Administrator |
Message
| Near the start of comm.c, add a line:
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h> // add this line
A bit further down (line 168) comment out all of the definitions, like this:
#if defined(linux)
/*
Linux shouldn't need these. If you have a problem compiling, try
uncommenting accept and bind.
int accept args( ( int s, struct sockaddr *addr, int *addrlen ) );
int bind args( ( int s, struct sockaddr *name, int namelen ) );
int close args( ( int fd ) );
int getpeername args( ( int s, struct sockaddr *name, int *namelen ) );
int getsockname args( ( int s, struct sockaddr *name, int *namelen ) );
int gettimeofday args( ( struct timeval *tp, struct timezone *tzp ) );
int listen args( ( int s, int backlog ) );
int read args( ( int fd, char *buf, int nbyte ) );
int select args( ( int width, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds, struct timeval *timeout ) );
int socket args( ( int domain, int type, int protocol ) );
int write args( ( int fd, char *buf, int nbyte ) );
*/ // <---- move closing comment to here
#endif
Then it will compile OK.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|