diff --git a/main.c b/main.c index 91ba155..0757061 100644 --- a/main.c +++ b/main.c @@ -19,6 +19,7 @@ #include #include +#include int main() { diff --git a/wii/network.c b/wii/network.c index a3bc341..eed8f8f 100644 --- a/wii/network.c +++ b/wii/network.c @@ -20,6 +20,7 @@ #include #include +#include int PrintNetworkAddresses() { @@ -43,7 +44,7 @@ void* NetSocket(uint32_t domain, uint32_t type, uint32_t protocol) { WiiNetworkContext* ctx; - ctx = malloc(sizeof(UnixNetworkContext)); + ctx = malloc(sizeof(WiiNetworkContext)); if(!ctx) return NULL; @@ -55,7 +56,7 @@ void* NetSocket(uint32_t domain, uint32_t type, uint32_t protocol) return NULL; } - ctx->fd = ret; + return ctx; } int32_t NetBind(void* net_ctx, struct sockaddr* addr, socklen_t addrlen)