const int on = 1;
struct sockaddr_in sockin;
- if ((listenfd = socket(PF_INET, SOCK_STREAM, AF_INET)) < 0) {
+ if ((listenfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
perror("socket(listenfd)");
return -1;
}
#define sleep Sleep
#define socklen_t int /* this must be a POSIXy thing */
#define snprintf _snprintf /* I'm not sure whats wrong with Microsoft here */
+#define close(x) closesocket(x) /* no comment */
#endif
#if defined(mach) && defined(__APPLE__)