Skip to content

Commit 19e79c4

Browse files
authored
cgen: fix for function-like macro '_BIONIC_AVAILABILITY_GUARD' which is not defined in older termux releases (#26345)
1 parent 47ca44b commit 19e79c4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎vlib/v/gen/c/cheaders.v‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,10 @@ typedef int (*qsort_callback_func)(const void*, const void*);
315315
#undef __attribute__
316316
#endif
317317
#ifdef __TERMUX__
318-
#if defined __BIONIC_AVAILABILITY_GUARD && __BIONIC_AVAILABILITY_GUARD(28)
318+
#if !defined(__BIONIC_AVAILABILITY_GUARD)
319+
#define __BIONIC_AVAILABILITY_GUARD(api_level) 0
320+
#endif
321+
#if __BIONIC_AVAILABILITY_GUARD(28)
319322
#else
320323
void * aligned_alloc(size_t alignment, size_t size) { return malloc(size); }
321324
#endif

0 commit comments

Comments
 (0)