Skip to content

Commit c1eb499

Browse files
committed
Merge pull request atomvm#601 from pguyot/w21/fix-errno-usage
Fix a conflict in usage of errno Allow including errno.h before port.h These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
2 parents 4682e15 + 6603e37 commit c1eb499

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libAtomVM/port.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ term port_heap_create_tuple2(Heap *heap, term a, term b);
3737
term port_heap_create_tuple3(Heap *heap, term a, term b, term c);
3838
term port_heap_create_tuple_n(Heap *heap, size_t num_terms, term *terms);
3939
term port_heap_create_error_tuple(Heap *heap, term reason);
40-
term port_heap_create_sys_error_tuple(Heap *heap, term syscall, int errno);
40+
term port_heap_create_sys_error_tuple(Heap *heap, term syscall, int err);
4141
term port_heap_create_ok_tuple(Heap *heap, term t);
4242
term port_heap_create_reply(Heap *heap, term ref, term payload);
4343

@@ -59,9 +59,9 @@ static inline term port_create_error_tuple(Context *ctx, term reason)
5959
{
6060
return port_heap_create_error_tuple(&ctx->heap, reason);
6161
}
62-
static inline term port_create_sys_error_tuple(Context *ctx, term syscall, int errno)
62+
static inline term port_create_sys_error_tuple(Context *ctx, term syscall, int err)
6363
{
64-
return port_heap_create_sys_error_tuple(&ctx->heap, syscall, errno);
64+
return port_heap_create_sys_error_tuple(&ctx->heap, syscall, err);
6565
}
6666
static inline term port_create_ok_tuple(Context *ctx, term t)
6767
{

0 commit comments

Comments
 (0)