wren-0.4.0-cli-glibc-build.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. From fcb09daf9abe0b4b7be71dd4dd966e2b0f6965da Mon Sep 17 00:00:00 2001
  2. From: Michel Hermier <michel.hermier@gmail.com>
  3. Date: Thu, 10 Mar 2022 10:56:45 +0100
  4. Subject: [PATCH 1/2] wren-cli: Fix build on glibc >= 2.34
  5. ---
  6. src/cli/vm.c | 4 ++--
  7. 1 file changed, 2 insertions(+), 2 deletions(-)
  8. diff --git a/src/cli/vm.c b/src/cli/vm.c
  9. index 48d2b1ee..a11ba5a7 100644
  10. --- a/src/cli/vm.c
  11. +++ b/src/cli/vm.c
  12. @@ -241,7 +241,7 @@ static WrenForeignClassMethods bindForeignClass(
  13. return methods;
  14. }
  15. -static void write(WrenVM* vm, const char* text)
  16. +static void doWrite(WrenVM* vm, const char* text)
  17. {
  18. printf("%s", text);
  19. }
  20. @@ -274,7 +274,7 @@ static void initVM()
  21. config.bindForeignClassFn = bindForeignClass;
  22. config.resolveModuleFn = resolveModule;
  23. config.loadModuleFn = loadModule;
  24. - config.writeFn = write;
  25. + config.writeFn = doWrite;
  26. config.errorFn = reportError;
  27. // Since we're running in a standalone process, be generous with memory.
  28. From 7373d483443c9da730b5383212d06bb5cf770d17 Mon Sep 17 00:00:00 2001
  29. From: ruby <ruby0x1@pm.me>
  30. Date: Fri, 8 Apr 2022 17:07:42 -0700
  31. Subject: [PATCH 2/2] use naming that matches
  32. ---
  33. src/cli/vm.c | 4 ++--
  34. 1 file changed, 2 insertions(+), 2 deletions(-)
  35. diff --git a/src/cli/vm.c b/src/cli/vm.c
  36. index a11ba5a7..cad75be0 100644
  37. --- a/src/cli/vm.c
  38. +++ b/src/cli/vm.c
  39. @@ -241,7 +241,7 @@ static WrenForeignClassMethods bindForeignClass(
  40. return methods;
  41. }
  42. -static void doWrite(WrenVM* vm, const char* text)
  43. +static void writeFn(WrenVM* vm, const char* text)
  44. {
  45. printf("%s", text);
  46. }
  47. @@ -274,7 +274,7 @@ static void initVM()
  48. config.bindForeignClassFn = bindForeignClass;
  49. config.resolveModuleFn = resolveModule;
  50. config.loadModuleFn = loadModule;
  51. - config.writeFn = doWrite;
  52. + config.writeFn = writeFn;
  53. config.errorFn = reportError;
  54. // Since we're running in a standalone process, be generous with memory.