wut/include/nsysnet/socket.h

39 lines
625 B
C
Raw Normal View History

2016-07-24 15:13:06 -07:00
#pragma once
#include <wut.h>
#include <stdint.h>
#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."
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)
{
2021-03-07 13:09:12 +01:00
return close(sockfd);
}
2021-03-07 13:09:12 +01:00
__attribute__ ((deprecated))
static inline int
socketlasterr()
{
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