@@ -1,8 +1,8 @@ /* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 - * Jonathan Schleifer + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 + * Jonathan Schleifer * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in @@ -163,19 +163,26 @@ free(tmp); @throw [OFOutOfMemoryException exceptionWithRequestedSize: sizeof(*addr)]; } +#ifdef __wii__ + addr->sin_len = 8; +#endif addr->sin_family = AF_INET; addr->sin_port = OF_BSWAP16_IF_LE(port); addr->sin_addr.s_addr = s_addr; tmp->family = AF_INET; tmp->type = type; tmp->protocol = 0; tmp->address = (struct sockaddr*)addr; +#ifndef __wii__ tmp->addressLength = sizeof(*addr); +#else + tmp->addressLength = 8; +#endif ret[0] = tmp; ret[1] = NULL; return ret;