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 <a.gatti@frob.it>
This commit is contained in:
Alessandro Gatti
2026-03-05 09:12:35 +01:00
committed by Damien George
parent b516d39024
commit 8fa4e0075f
+2
View File
@@ -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