diff --git a/src/mesa/util/os_socket.h b/src/mesa/util/os_socket.h index 0d6f8749..f33a685b 100644 --- a/src/mesa/util/os_socket.h +++ b/src/mesa/util/os_socket.h @@ -10,6 +10,7 @@ #include #include +#include #ifdef _MSC_VER #include typedef SSIZE_T ssize_t; diff --git a/src/mesa/util/os_time.c b/src/mesa/util/os_time.c index c5c47657..dbabc0f3 100644 --- a/src/mesa/util/os_time.c +++ b/src/mesa/util/os_time.c @@ -50,6 +50,8 @@ # include #elif DETECT_OS_WINDOWS # include +#elif __EMSCRIPTEN__ + #else # error Unsupported OS #endif @@ -93,6 +95,8 @@ os_time_get_nano(void) / frequency.QuadPart; return secs*INT64_C(1000000000) + nanosecs; +#elif __EMSCRIPTEN__ + return 0; #else #error Unsupported OS @@ -120,6 +124,8 @@ os_time_sleep(int64_t usecs) if (dwMilliseconds) { Sleep(dwMilliseconds); } +#elif __EMSCRIPTEN__ + #else # error Unsupported OS #endif diff --git a/src/meson.build b/src/meson.build index 838e273f..45fd3721 100644 --- a/src/meson.build +++ b/src/meson.build @@ -67,7 +67,6 @@ if is_unixy or cpp.get_id() == 'emscripten' 'memory.cpp', 'iostats.cpp', 'elfhacks.cpp', - 'real_dlsym.cpp', 'pci_ids.cpp', 'battery.cpp', 'control.cpp', @@ -76,6 +75,10 @@ if is_unixy or cpp.get_id() == 'emscripten' 'intel.cpp' ) + if cpp.get_id() != 'emscripten' + vklayer_files += 'real_dlsym.cpp' + endif + if get_option('with_notify').enabled() vklayer_files += 'notify.cpp' endif diff --git a/src/overlay_params.cpp b/src/overlay_params.cpp index f7acc00d..c2c4d598 100644 --- a/src/overlay_params.cpp +++ b/src/overlay_params.cpp @@ -97,9 +97,11 @@ static int parse_control(const char *str) { std::string path(str); +#ifndef __EMSCRIPTEN__ size_t npos = path.find("%p"); if (npos != std::string::npos) path.replace(npos, 2, std::to_string(getpid())); +#endif SPDLOG_DEBUG("Socket: {}", path); int ret = os_socket_listen_abstract(path.c_str(), 1);