From 8fa4e0075fae24fc710f3e3033d34f61e514b794 Mon Sep 17 00:00:00 2001 From: Alessandro Gatti Date: Thu, 5 Mar 2026 09:12:35 +0100 Subject: [PATCH] unix/mpconfigport: Report the correct sys.platform name on FreeBSD. This commit lets the "sys" module report the correct value of "sys.platform" on FreeBSD systems. The only two platforms known to the module were Darwin and Linux, with the latter used as a fallback. Now FreeBSD is also recognised as such, with the appropriate string being set. Signed-off-by: Alessandro Gatti --- ports/unix/mpconfigport.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/unix/mpconfigport.h b/ports/unix/mpconfigport.h index 228cd48e22..8ef4f666ef 100644 --- a/ports/unix/mpconfigport.h +++ b/ports/unix/mpconfigport.h @@ -45,6 +45,8 @@ #ifndef MICROPY_PY_SYS_PLATFORM #if defined(__APPLE__) && defined(__MACH__) #define MICROPY_PY_SYS_PLATFORM "darwin" +#elif defined(__FreeBSD__) + #define MICROPY_PY_SYS_PLATFORM "freebsd" #else #define MICROPY_PY_SYS_PLATFORM "linux" #endif