#ifndef lint
static char *rcsid_gdb_conn_c = "$Header$";
-#endif lint
+#endif
/************************************************************************
*
#include <mit-copyright.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include "gdb.h"
#include <sys/types.h>
#ifdef SOLARIS
#include <sys/filio.h>
#endif /* SOLARIS */
+#ifdef POSIX
+#include <unistd.h>
+#endif
extern int errno;
-#ifdef vax
-extern u_short htons(); /* ?? All versions? */
-#endif vax
CONNECTION gdb_allocate_connection();
{
int peer; /* socket for talking to
peer */
- int on = 1; /* flag for ioctl */
+ char on = 1; /* flag for ioctl */
struct sockaddr_in target; /* build the peer address */
/* here */
struct hostent *peer_host; /* host where peer is */
/* of pending non-accepted */
/* cons.*/
fromlen = sizeof(from);
- peer = accept(slisten, &from, &fromlen);
+ peer = accept(slisten, (struct sockaddr *)&from, &fromlen);
if (peer < 0) {
g_stop_with_errno(con);
gdb_perror("gdb_try_accepting: error accepting connection");
con->status = CON_UP;
else
con->status = CON_STOPPED;
-#else !VERIFY_PROTOCOL
+#else
con->status = CON_UP;
-#endif !VERIFY_PROTOCOL
+#endif
}
g_stop_with_errno(con);
return;
}
-#else !VERIFY_PROTOCOL
+#else
con->status = CON_UP;
#endif
}