]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't build semaphore code under emscripten, it's not available
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 5 May 2022 09:14:25 +0000 (11:14 +0200)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 5 May 2022 09:14:25 +0000 (11:14 +0200)
src/lib/util/sem.c
src/lib/util/sem.h

index e39b242c6d4991deb63769417b9174edeb41643c..27deeda4b9936e114838712d4b9c588c8284954f 100644 (file)
  */
 RCSID("$Id$")
 
+/*
+ * Semaphore functions missing in musl/emscripten.
+ *
+ * This isn't really needed for browser functionality anyway
+ */
+#ifndef __EMSCRIPTEN__
 #include <sys/ipc.h>
 #include <sys/sem.h>
 #include <sys/stat.h>
@@ -517,3 +523,4 @@ again:
 
        return sem_id;
 }
+#endif /* __EMSCRIPTEN__ */
index ab82be3085b59f15c7f1c8485af107c865a159bc..610bad20fe6df3cfc814b997eb18e7901b26e0a0 100644 (file)
@@ -24,6 +24,7 @@
  */
 RCSIDH(sem_h, "$Id$")
 
+#ifndef __EMSCRIPTEN__
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -51,3 +52,4 @@ int   fr_sem_get(char const *file, int proj_id, uid_t uid, gid_t gid, bool check_p
 #ifdef __cplusplus
 }
 #endif
+#endif