icinga2/base/unix.h

28 lines
426 B
C
Raw Normal View History

2012-03-28 13:24:49 +02:00
#ifndef I2_UNIX_H
#define I2_UNIX_H
#include <execinfo.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
2012-03-28 13:24:49 +02:00
#include <netinet/in.h>
#include <arpa/inet.h>
typedef int SOCKET;
#define INVALID_SOCKET (-1)
inline void Sleep(unsigned long milliseconds)
{
usleep(milliseconds * 1000);
}
inline void closesocket(int fd)
{
close(fd);
}
#define ioctlsocket ioctl
2012-03-28 13:24:49 +02:00
#endif /* I2_UNIX_H */