Skip to content

Commit 3a23821

Browse files
author
ace411
committedDec 22, 2024
feat: add sockaddr * type cast
1 parent 882d9ee commit 3a23821

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/loop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ static void *php_mrloop_tcp_client_setup(int fd, char **buffer, int *bsize)
267267

268268
socklen = sizeof(php_sockaddr_t);
269269

270-
if (getpeername(fd, &addr, &socklen) > -1)
270+
if (getpeername(fd, (struct sockaddr *)&addr, &socklen) > -1)
271271
{
272272
inet_ntop(AF_INET, &addr.sin_addr, ip_str, INET_ADDRSTRLEN);
273273

0 commit comments

Comments
 (0)