misc.c revision d2ccf0a73e90713adb9e409b073c4af60325ad73
/*
* Copyright (c) 1995 Danny Gasparovski.
*
* Please read the file COPYRIGHT for the
* terms and conditions of the copyright.
*/
#define WANT_SYS_IOCTL_H
#include <slirp.h>
#ifndef HAVE_INET_ATON
int
const char *cp;
{
if (addr == 0xffffffff)
return 0;
return 1;
}
#endif
/*
* Get our IP address and put it in our_addr
*/
void
{
}
struct quehead_32 {
};
void
{
}
void
{
}
#endif /* SIZEOF_CHAR_P == 8 && !VBOX_WITH_BSD_REASS */
struct quehead {
};
void
{
}
void
{
/* element->qh_link = NULL; TCP FIN1 crashes if you do this. Why ? */
}
/* #endif */
int
int do_pty;
char *exec;
int addr;
int port;
{
/* First, check if the port is "bound" */
return -1;
}
return 0;
}
#ifndef HAVE_STRERROR
/*
* For systems with no strerror
*/
extern int sys_nerr;
extern char *sys_errlist[];
char *
int error;
{
return sys_errlist[error];
else
return "Unknown error.";
}
#endif
#ifndef HAVE_STRDUP
char *
const char *str;
{
char *bptr;
return bptr;
}
#endif
#ifdef BAD_SPRINTF
/*
* Some BSD-derived systems have a sprintf which returns char *
*/
int
char *string;
const char *format;
{
}
int
#ifdef __STDC__
#else
#endif
{
#ifdef __STDC__
#else
char *string;
char *format;
#endif
}
#endif
void
int usec;
{
struct timeval t;
t.tv_sec = 0;
}
/*
* Set fd blocking and non-blocking
*/
void
int fd;
{
#ifdef FIONBIO
int opt = 1;
#else
int opt;
opt |= O_NONBLOCK;
#endif
}
void
int fd;
{
#ifdef FIONBIO
int opt = 0;
#else
int opt;
opt &= ~O_NONBLOCK;
#endif
}