Skip to content

Commit

Permalink
add workaround for musl
Browse files Browse the repository at this point in the history
  • Loading branch information
ouwou committed Jun 22, 2024
1 parent acec223 commit a21fff9
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/abaddon.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "abaddon.hpp"
#include <cstdlib>
#include <memory>
#include <spdlog/spdlog.h>
#include <spdlog/cfg/env.h>
Expand Down Expand Up @@ -1153,7 +1154,32 @@ void Abaddon::on_window_hide() {
}
}

// clang-format off

#ifdef __GLIBC__
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#include <features.h>
#ifndef __USE_GNU
#define __MUSL__
#endif
#undef _GNU_SOURCE
#else
#include <features.h>
#ifndef __USE_GNU
#define __MUSL__
#endif
#endif
#endif

// clang-format on

int main(int argc, char **argv) {
#ifdef __MUSL__
char env[] = "LANG=C";
putenv(env);
#endif

if (std::getenv("ABADDON_NO_FC") == nullptr)
Platform::SetupFonts();

Expand Down

0 comments on commit a21fff9

Please sign in to comment.