logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git
commit: 6b8670fe8fc17115a2d20b4eabb9139cc4cde38e
parent dc26e99dd50953bff812c954ba2f44cdb41fcb4c
Author: Nick Brassel <nick@tzarc.org>
Date:   Thu, 10 Apr 2025 10:43:25 +1000

Cater for use of `__errno_r()` in ChibiOS syscalls.c with newer picolibc revisions (#25121)


Diffstat:

Aplatforms/chibios/errno.h13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/platforms/chibios/errno.h b/platforms/chibios/errno.h @@ -0,0 +1,13 @@ +// Copyright 2025 Nick Brassel (@tzarc) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once +#include_next <errno.h> + +// Newer versions of picolibc don't seem to provide `__errno_r(r)` in the header file, but is used by ChibiOS. +#ifndef __errno_r +# ifdef __REENT_ERRNO +# define __errno_r(r) _REENT_ERRNO(r) +# else +# define __errno_r(r) (errno) +# endif +#endif