Skip to content

Commit b9d1bd6

Browse files
committed
stdlib: rename uACPIi's implementation of uacpi_kernel_alloc_zeroed
This is needed to make sure that the user cannot accidentally put the define in a place where it doesn't reach all translation units thus making them use different modes. Instead they will now produce undefined references at link time. Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
1 parent 4a55536 commit b9d1bd6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

include/uacpi/internal/stdlib.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,6 @@ uacpi_u8 uacpi_bit_scan_backward(uacpi_u64);
8282
uacpi_u8 uacpi_popcount(uacpi_u64);
8383

8484
#ifndef UACPI_NATIVE_ALLOC_ZEROED
85-
void *uacpi_kernel_alloc_zeroed(uacpi_size size);
85+
void *uacpi_builtin_alloc_zeroed(uacpi_size size);
86+
#define uacpi_kernel_alloc_zeroed uacpi_builtin_alloc_zeroed
8687
#endif

source/stdlib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ void uacpi_log(uacpi_log_level lvl, const uacpi_char *str, ...)
697697
#endif
698698

699699
#ifndef UACPI_NATIVE_ALLOC_ZEROED
700-
void *uacpi_kernel_alloc_zeroed(uacpi_size size)
700+
void *uacpi_builtin_alloc_zeroed(uacpi_size size)
701701
{
702702
void *ptr;
703703

0 commit comments

Comments
 (0)