Skip to content

Commit

Permalink
fuck glibc
Browse files Browse the repository at this point in the history
Co-authored-by: Stonedestroyer <[email protected]>
  • Loading branch information
topi314 and Stonedestroyer committed Dec 3, 2023
1 parent 56b0325 commit 976a2cf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion natives/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.10)
project(lpnatives C)

add_subdirectory(samplerate)
Expand Down
4 changes: 3 additions & 1 deletion natives/connector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
add_library(connector SHARED samplerate.c fdk-aac.c vorbis.c opus.c mpg123.c)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
add_library(connector SHARED samplerate.c fdk-aac.c vorbis.c opus.c mpg123.c ${SYSNAME}/statistics.c math_hacks.c)
else()
add_library(connector SHARED samplerate.c fdk-aac.c vorbis.c opus.c mpg123.c ${SYSNAME}/statistics.c)
add_library(connector SHARED samplerate.c fdk-aac.c vorbis.c opus.c mpg123.c ${SYSNAME}/statistics.c)
endif()

target_link_libraries(connector samplerate fdk-aac vorbis opus mpg123)
9 changes: 9 additions & 0 deletions natives/connector/math_hack.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <math.h>

double __exp_finite(double x) { return exp(x); }
double __log_finite(double x) { return log(x); }
double __pow_finite(double x, double y) { return pow(x, y); }

float __expf_finite(float x) { return expf(x); }
float __logf_finite(float x) { return logf(x); }
float __powf_finite(float x, float y) { return powf(x, y); }

0 comments on commit 976a2cf

Please sign in to comment.