ObjFW  Diff

Differences From Artifact [995660e003]:

To Artifact [fe41dbfdaa]:


161
162
163
164
165
166
167



168
169
170
171
172
173
174
175

176



177
178
179
180
181
182
183
			if ((addr = calloc(1, sizeof(*addr))) == NULL) {
				free(ret);
				free(tmp);
				@throw [OFOutOfMemoryException
				    exceptionWithRequestedSize: sizeof(*addr)];
			}




			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;

			tmp->addressLength = sizeof(*addr);




			ret[0] = tmp;
			ret[1] = NULL;

			return ret;
		}








>
>
>








>

>
>
>







161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
			if ((addr = calloc(1, sizeof(*addr))) == NULL) {
				free(ret);
				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;
		}