aboutsummaryrefslogtreecommitdiff
path: root/platforms/chibios/errno.h
blob: a411ed98212d25c822c664fd860396887764cca1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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