Browse Source

Stub missing functions for 3DS

pull/2130/head
staphen 5 years ago committed by Anders Jenbo
parent
commit
12cd536259
  1. 5
      CMakeLists.txt
  2. 22
      Source/platform/ctr/asio/net/if.c
  3. 18
      Source/platform/ctr/asio/sys/socket.c
  4. 13
      Source/platform/ctr/asio/sys/uio.c

5
CMakeLists.txt

@ -493,7 +493,10 @@ if(NINTENDO_3DS)
Source/platform/ctr/display.cpp
Source/platform/ctr/messagebox.cpp
Source/platform/ctr/random.cpp
Source/platform/ctr/sockets.cpp)
Source/platform/ctr/sockets.cpp
Source/platform/ctr/asio/net/if.c
Source/platform/ctr/asio/sys/socket.c
Source/platform/ctr/asio/sys/uio.c)
set(BIN_TARGET ${BIN_TARGET}.elf)
endif()

22
Source/platform/ctr/asio/net/if.c

@ -0,0 +1,22 @@
#include <stddef.h>
#include <errno.h>
#include <net/if.h>
unsigned int if_nametoindex(const char *__ifname)
{
return ENOTSUP;
}
char *if_indextoname(unsigned int __ifindex, char *__ifname)
{
return NULL;
}
struct if_nameindex *if_nameindex()
{
return NULL;
}
void if_freenameindex(struct if_nameindex *__ptr)
{
}

18
Source/platform/ctr/asio/sys/socket.c

@ -0,0 +1,18 @@
#include <sys/socket.h>
#include <sys/types.h>
#include <errno.h>
ssize_t recvmsg(int socket, struct msghdr *message, int flags)
{
return ENOTSUP;
}
ssize_t sendmsg(int socket, const struct msghdr *message, int flags)
{
return ENOTSUP;
}
int socketpair(int domain, int type, int protocol, int socket_vector[2])
{
return ENOTSUP;
}

13
Source/platform/ctr/asio/sys/uio.c

@ -0,0 +1,13 @@
#include <sys/uio.h>
#include <sys/types.h>
#include <errno.h>
ssize_t readv(int __fd, const struct iovec *__iovec, int __count)
{
return ENOTSUP;
}
ssize_t writev(int __fd, const struct iovec *__iovec, int __count)
{
return ENOTSUP;
}
Loading…
Cancel
Save