-*- Mode: Diff -*-
--- raptor/src/sort_r.h
+++ raptor/src/sort_r.h
@@ -28,7 +28,7 @@
 #  define _SORT_R_BSD
 #elif (defined _GNU_SOURCE || defined __gnu_hurd__ || defined __GNU__ || \
        defined __linux__ || defined __MINGW32__ || defined __GLIBC__ || \
-       defined __CYGWIN__)
+       defined __CYGWIN__ || defined __EMSCRIPTEN__)
 #  define _SORT_R_LINUX
 #elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
 #  define _SORT_R_WINDOWS
