Libc (DragonFly): add support

This commit is contained in:
李通洲
2024-11-03 11:47:24 +08:00
parent 9610912c1f
commit 743babda10
3 changed files with 19 additions and 3 deletions
+9 -2
View File
@@ -2,11 +2,18 @@
const char* ffDetectLibc(FFLibcResult* result)
{
#ifdef __DragonFly__ // We define `__FreeBSD__` on DragonFly BSD for simplification
result->name = "DF";
#ifdef FF_DF_VERSION
result->version = FF_DF_VERSION;
#endif
#elif __FreeBSD__
result->name = "FBSD";
#ifdef FF_FBSD_VERSION
#ifdef FF_FBSD_VERSION
result->version = FF_FBSD_VERSION;
#endif
#else
result->name = "Unknown";
result->version = NULL;
#endif
return NULL;
+2
View File
@@ -26,6 +26,8 @@
#define FF_SYSNAME "Android"
#elif defined(__linux__)
#define FF_SYSNAME "Linux"
#elif defined(__DragonFly__) // We define `__FreeBSD__` on DragonFly BSD for simplification
#define FF_SYSNAME "DragonFly"
#elif defined(__FreeBSD__)
#define FF_SYSNAME "FreeBSD"
#elif defined(__APPLE__)