Skip to content

Commit 6603e37

Browse files
committed
Fix a conflict in usage of errno
Allow including errno.h before port.h Signed-off-by: Paul Guyot <[email protected]>
1 parent 4682e15 commit 6603e37

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)