asmjit_sgx_patch.diff 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. diff --git a/src/asmjit/core/cpuinfo.cpp b/src/asmjit/core/cpuinfo.cpp
  2. index 7bf7407..ae2160b 100644
  3. --- a/src/asmjit/core/cpuinfo.cpp
  4. +++ b/src/asmjit/core/cpuinfo.cpp
  5. @@ -9,13 +9,13 @@
  6. #if !defined(_WIN32)
  7. #include <errno.h>
  8. - #include <sys/utsname.h>
  9. + //#include <sys/utsname.h>
  10. #include <unistd.h>
  11. #endif
  12. // Required by `getauxval()` on Linux.
  13. #if defined(__linux__)
  14. - #include <sys/auxv.h>
  15. + //#include <sys/auxv.h>
  16. #endif
  17. //! Required to detect CPU and features on Apple platforms.
  18. diff --git a/src/asmjit/core/globals.cpp b/src/asmjit/core/globals.cpp
  19. index 2bbd0c0..e6b69e5 100644
  20. --- a/src/asmjit/core/globals.cpp
  21. +++ b/src/asmjit/core/globals.cpp
  22. @@ -105,6 +105,8 @@ ASMJIT_FAVOR_SIZE const char* DebugUtils::errorAsString(Error err) noexcept {
  23. #endif
  24. }
  25. +extern "C" int os_printf(const char *message, ...);
  26. +
  27. // DebugUtils - Debug Output
  28. // =========================
  29. @@ -112,7 +114,7 @@ ASMJIT_FAVOR_SIZE void DebugUtils::debugOutput(const char* str) noexcept {
  30. #if defined(_WIN32)
  31. ::OutputDebugStringA(str);
  32. #else
  33. - ::fputs(str, stderr);
  34. + os_printf(str);
  35. #endif
  36. }