Browse Source

JUCE: Fix build on musl

From https://github.com/juce-framework/JUCE/pull/1239.

Signed-off-by: Violet Purcell <vimproved@inventati.org>
pull/1808/head
Violet Purcell 1 year ago
parent
commit
a772bbb905
No known key found for this signature in database GPG Key ID: FC4685561892D0BA
5 changed files with 18 additions and 9 deletions
  1. +1
    -1
      source/modules/juce_core/juce_core.cpp
  2. +6
    -6
      source/modules/juce_core/native/juce_linux_SystemStats.cpp
  3. +1
    -1
      source/modules/juce_core/native/juce_posix_SharedCode.h
  4. +1
    -1
      source/modules/juce_core/system/juce_SystemStats.cpp
  5. +9
    -0
      source/modules/juce_core/system/juce_TargetPlatform.h

+ 1
- 1
source/modules/juce_core/juce_core.cpp View File

@@ -103,7 +103,7 @@
#include <net/if.h> #include <net/if.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#if ! (JUCE_ANDROID || JUCE_WASM)
#if ! (JUCE_ANDROID || JUCE_WASM || JUCE_MUSL)
#include <execinfo.h> #include <execinfo.h>
#endif #endif
#endif #endif


+ 6
- 6
source/modules/juce_core/native/juce_linux_SystemStats.cpp View File

@@ -198,22 +198,22 @@ String SystemStats::getComputerName()
String SystemStats::getUserLanguage() String SystemStats::getUserLanguage()
{ {
#if JUCE_BSD
#if JUCE_GLIBC
return getLocaleValue (_NL_IDENTIFICATION_LANGUAGE);
#else
if (auto langEnv = getenv ("LANG")) if (auto langEnv = getenv ("LANG"))
return String::fromUTF8 (langEnv).upToLastOccurrenceOf (".UTF-8", false, true); return String::fromUTF8 (langEnv).upToLastOccurrenceOf (".UTF-8", false, true);
return {}; return {};
#else
return getLocaleValue (_NL_IDENTIFICATION_LANGUAGE);
#endif #endif
} }
String SystemStats::getUserRegion() String SystemStats::getUserRegion()
{ {
#if JUCE_BSD
return {};
#else
#if JUCE_GLIBC
return getLocaleValue (_NL_IDENTIFICATION_TERRITORY); return getLocaleValue (_NL_IDENTIFICATION_TERRITORY);
#else
return {};
#endif #endif
} }


+ 1
- 1
source/modules/juce_core/native/juce_posix_SharedCode.h View File

@@ -167,7 +167,7 @@ int juce_siginterrupt (int sig, int flag)
//============================================================================== //==============================================================================
namespace namespace
{ {
#if JUCE_LINUX || (JUCE_IOS && ! __DARWIN_ONLY_64_BIT_INO_T) // (this iOS stuff is to avoid a simulator bug)
#if JUCE_GLIBC || (JUCE_IOS && ! __DARWIN_ONLY_64_BIT_INO_T) // (this iOS stuff is to avoid a simulator bug)
using juce_statStruct = struct stat64; using juce_statStruct = struct stat64;
#define JUCE_STAT stat64 #define JUCE_STAT stat64
#else #else


+ 1
- 1
source/modules/juce_core/system/juce_SystemStats.cpp View File

@@ -133,7 +133,7 @@ String SystemStats::getStackBacktrace()
{ {
String result; String result;
#if JUCE_ANDROID || JUCE_MINGW || JUCE_WASM
#if JUCE_ANDROID || JUCE_MINGW || JUCE_WASM || JUCE_MUSL
jassertfalse; // sorry, not implemented yet! jassertfalse; // sorry, not implemented yet!
#elif JUCE_WINDOWS #elif JUCE_WINDOWS


+ 9
- 0
source/modules/juce_core/system/juce_TargetPlatform.h View File

@@ -33,6 +33,7 @@
- Either JUCE_LITTLE_ENDIAN or JUCE_BIG_ENDIAN. - Either JUCE_LITTLE_ENDIAN or JUCE_BIG_ENDIAN.
- Either JUCE_INTEL or JUCE_ARM - Either JUCE_INTEL or JUCE_ARM
- Either JUCE_GCC or JUCE_CLANG or JUCE_MSVC - Either JUCE_GCC or JUCE_CLANG or JUCE_MSVC
- Either JUCE_GLIBC or JUCE_MUSL will be defined on Linux depending on the system's libc implementation.
*/ */
//============================================================================== //==============================================================================
@@ -161,6 +162,14 @@
#elif __MMX__ || __SSE__ || __amd64__ #elif __MMX__ || __SSE__ || __amd64__
#define JUCE_INTEL 1 #define JUCE_INTEL 1
#endif #endif
#if JUCE_LINUX
#ifdef __GLIBC__
#define JUCE_GLIBC 1
#else
#define JUCE_MUSL 1
#endif
#endif
#endif #endif
//============================================================================== //==============================================================================


Loading…
Cancel
Save