1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-15 17:43:51 +01:00

sys/picolibc_syscalls_default: fix linking with 1.8.10+

This adapts to an API change for providing stdin/stdout/stderr: The
macro to test whether globals are to be used is now prefixed with two
underscores.

Co-authored-by: crasbe <crasbe@gmail.com>
This commit is contained in:
Marian Buschsieweke 2025-04-26 22:50:56 +02:00
parent 59b1774daa
commit 0be58f6e3a
No known key found for this signature in database
GPG Key ID: 77AA882EC78084E6

View File

@ -238,7 +238,9 @@ static int picolibc_get(FILE *file)
FILE picolibc_stdio = FILE picolibc_stdio =
FDEV_SETUP_STREAM(picolibc_put, picolibc_get, picolibc_flush, _FDEV_SETUP_RW); FDEV_SETUP_STREAM(picolibc_put, picolibc_get, picolibc_flush, _FDEV_SETUP_RW);
#ifdef PICOLIBC_STDIO_GLOBALS /* Since picolibc 1.8.10, PICOLIBC_STDIO_GLOBALS is prefixed with two leading
* underscores. We just test for both to remain backwards compatible */
#if defined(PICOLIBC_STDIO_GLOBALS) || defined(__PICOLIBC_STDIO_GLOBALS)
#ifdef __strong_reference #ifdef __strong_reference
/* This saves two const pointers. /* This saves two const pointers.
* See https://github.com/RIOT-OS/RIOT/pull/17001#issuecomment-945936918 * See https://github.com/RIOT-OS/RIOT/pull/17001#issuecomment-945936918