]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Minor fixes for emscripten
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 27 Apr 2022 19:29:20 +0000 (14:29 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 27 Apr 2022 20:32:22 +0000 (15:32 -0500)
scripts/build/dlopen.c

index 8e8b6d4823c99dde5646140c1c69b99e10108c2b..39b72acc0982ee8e3128ae09614e652a5f4580a0 100644 (file)
@@ -36,11 +36,11 @@ RCSID("$Id$")
 
 #include "log.h"
 
-#if defined(__linux__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__)
 #include <link.h>
 #endif
 
-#ifdef __APPLE__
+#if defined(__APPLE__)
 /*
  *     <link.h> is buried somewhere.  The fields below are known to
  *     be correct.
@@ -52,8 +52,12 @@ struct link_map {
 };
 
 #  define DL_EXTENSION ".dylib"
-#else
+#elif defined(__linux__)
 #  define DL_EXTENSION ".so"
+#elif defined(__EMSCRIPTEN__)
+#  define DL_EXTENSION ".wasm"
+#else
+#  error Unsupported platform
 #endif
 
 #ifndef _POSIX_C_SOURCE
@@ -579,7 +583,7 @@ static void ad_have_feature(char const *symbol)
 
        if (!symbol || !*symbol) return;
 
-       len = strlen(symbol);   
+       len = strlen(symbol);
 
        /*
         *      "HAVE_" foo "=1\0"