2016-07-24 15:13:06 -07:00
|
|
|
#pragma once
|
|
|
|
#include <wut.h>
|
|
|
|
#include <stdint.h>
|
2017-04-10 23:18:04 +01:00
|
|
|
#include <sys/time.h>
|
|
|
|
#include <sys/types.h>
|
2021-03-07 13:09:12 +01:00
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <arpa/inet.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <errno.h>
|
|
|
|
|
|
|
|
#warning "nsysnet/socket.h is deprecated; please use standard socket headers instead."
|
2017-04-10 23:18:04 +01:00
|
|
|
|
2018-06-18 11:13:25 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2021-03-07 13:09:12 +01:00
|
|
|
#define NSN_EAGAIN EAGAIN
|
|
|
|
#define NSN_EWOULDBLOCK EWOULDBLOCK
|
2016-07-24 15:13:06 -07:00
|
|
|
|
2021-03-07 13:09:12 +01:00
|
|
|
__attribute__ ((deprecated))
|
|
|
|
static inline int
|
|
|
|
socketclose(int sockfd)
|
2017-04-05 18:13:41 +01:00
|
|
|
{
|
2021-03-07 13:09:12 +01:00
|
|
|
return close(sockfd);
|
|
|
|
}
|
2017-04-05 18:13:41 +01:00
|
|
|
|
2021-03-07 13:09:12 +01:00
|
|
|
__attribute__ ((deprecated))
|
|
|
|
static inline int
|
|
|
|
socketlasterr()
|
2017-04-05 18:13:41 +01:00
|
|
|
{
|
2021-03-07 13:09:12 +01:00
|
|
|
return errno;
|
|
|
|
}
|
2017-04-07 01:23:29 +01:00
|
|
|
|
2016-07-24 15:13:06 -07:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|