mirror of
https://github.com/wiiu-env/wut.git
synced 2024-12-05 03:24:17 +01:00
f78363be81
- socket_lib_init/exit wrappers are no longer stubs; they now perform refcounting & automatically register/deregister the socket devoptab - Similarly, WHBInitialize/DeinitializeSocketLibrary are now aliased to socket_lib_init/exit - WHBLogUdp now references socket_lib_init/finish again - __init/fini_wut_socket have been simplified and are now weak, this is intended to allow users to customize their behaviour
39 lines
625 B
C
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
|
|
|