Skip to content

Instantly share code, notes, and snippets.

@rw-r-r-0644
Created May 9, 2020 16:14
Show Gist options
  • Save rw-r-r-0644/29c1658d0e1691ecd8d02d516b22fdda to your computer and use it in GitHub Desktop.
Save rw-r-r-0644/29c1658d0e1691ecd8d02d516b22fdda to your computer and use it in GitHub Desktop.
#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>
#warning "nsysnet/socket.h is deprecated; please use standard socket headers instead."
#ifdef __cplusplus
extern "C" {
#endif
extern int __wut_last_nsysnet_result;
#define NSN_EAGAIN 6
#define NSN_EWOULDBLOCK 6
__attribute__ ((deprecated))
static inline void
socket_lib_init()
{
}
__attribute__ ((deprecated))
static inline void
socket_lib_finish()
{
}
__attribute__ ((deprecated))
static inline int
socketclose(int sockfd)
{
return close(sockfd);
}
__attribute__ ((deprecated))
static inline int socketlasterr()
{
return __wut_last_nsysnet_result;
}
#ifdef __cplusplus
}
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment