ObjFW  Diff

Differences From Artifact [c5f416940a]:

To Artifact [ac7909760b]:


189
190
191
192
193
194
195
196
197


198
199
200
201
202
203
204
205
206
207

208
209
210
211
212
213
214
215
216
189
190
191
192
193
194
195


196
197
198
199
200
201
202
203
204
205
206

207
208
209
210
211
212
213
214
215
216







-
-
+
+









-
+










	return 0;
#endif
}

#ifndef OF_WII
int
of_getsockname(of_socket_t socket, struct sockaddr *restrict address,
    socklen_t *restrict address_len)
of_getsockname(of_socket_t sock, struct sockaddr *restrict addr,
    socklen_t *restrict addrLen)
{
	int ret;

# ifdef OF_HAVE_THREADS
	if (!of_mutex_lock(&mutex))
		@throw [OFLockFailedException exception];

# endif

	ret = getsockname(socket, address, address_len);
	ret = getsockname(sock, addr, addrLen);

# ifdef OF_HAVE_THREADS
	if (!of_mutex_unlock(&mutex))
		@throw [OFUnlockFailedException exception];
# endif

	return ret;
}
#endif