File 1305-Fix-as-per-review.patch of Package erlang
From 025e01f055ec8980ac6e781e10ca6ee322ad64fe Mon Sep 17 00:00:00 2001
From: Nelson Vides <videsnelson@gmail.com>
Date: Tue, 24 Feb 2026 11:15:39 +0100
Subject: [PATCH 05/14] Fix as per review
---
erts/emulator/nifs/unix/unix_socket_syncio.c | 3 +--
erts/preloaded/src/prim_socket.erl | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/erts/emulator/nifs/unix/unix_socket_syncio.c b/erts/emulator/nifs/unix/unix_socket_syncio.c
index 56d1da0c3a..e82aadb5ef 100644
--- a/erts/emulator/nifs/unix/unix_socket_syncio.c
+++ b/erts/emulator/nifs/unix/unix_socket_syncio.c
@@ -4208,11 +4208,10 @@ ERL_NIF_TERM essio_recvmmsg(ErlNifEnv* env,
* copying data from raw memory blocks.
*/
{
+ size_t totalBytes = 0;
ERL_NIF_TERM* elems;
ESOCK_ASSERT( (elems = MALLOC(readResult * sizeof(ERL_NIF_TERM))) != NULL );
- size_t totalBytes = 0;
-
for (i = 0; i < (unsigned int) readResult; i++) {
ErlNifBinary bin;
size_t ctrlLen;
diff --git a/erts/preloaded/src/prim_socket.erl b/erts/preloaded/src/prim_socket.erl
index 829c8bfe02..0999c313b3 100644
--- a/erts/preloaded/src/prim_socket.erl
+++ b/erts/preloaded/src/prim_socket.erl
@@ -3,7 +3,7 @@
%%
%% SPDX-License-Identifier: Apache-2.0
%%
-%% Copyright Ericsson AB 2018-2025. All Rights Reserved.
+%% Copyright Ericsson AB 2018-2026. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -57,7 +57,8 @@
nif_listen/2, nif_accept/2,
nif_send/4, nif_sendto/5, nif_sendmsg/5, nif_sendmmsg/4, nif_sendv/3,
nif_sendfile/5, nif_sendfile/4, nif_sendfile/1, nif_recv/4,
- nif_recvfrom/4, nif_recvmsg/5, nif_close/1, nif_shutdown/2,
+ nif_recvfrom/4, nif_recvmsg/5, nif_recvmmsg/6,
+ nif_close/1, nif_shutdown/2,
nif_setopt/5, nif_getopt/3, nif_getopt/4, nif_sockname/1,
nif_peername/1, nif_ioctl/2, nif_ioctl/3, nif_ioctl/4, nif_cancel/3,
nif_finalize_close/1]).
--
2.51.0