wut/include/nsysnet/socket.h
fincs eb0306184d
wutsocket: Revise automatic initialization, see details:
- __init/fini_wut_socket have been simplified and are now weak,
  this is intended to allow users to customize their behaviour
- socket_lib_init/exit have been restored as regular imports and are
  no longer using RPLWRAP
- __wut_socket_init/fini_devoptab are now exposed as global symbols,
  intended to be used in custom socket init/deinit logic
2021-09-18 16:57:29 +02:00

39 lines
625 B
C

#pragma once
#include <wut.h>
#include <stdint.h>
#include <sys/time.h>
#include <sys/types.h>
#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."
#ifdef __cplusplus
extern "C" {
#endif
#define NSN_EAGAIN EAGAIN
#define NSN_EWOULDBLOCK EWOULDBLOCK
__attribute__ ((deprecated))
static inline int
socketclose(int sockfd)
{
return close(sockfd);
}
__attribute__ ((deprecated))
static inline int
socketlasterr()
{
return errno;
}
#ifdef __cplusplus
}
#endif