aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/glibc-versions-hack.cpp
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-12-06 15:48:41 -0800
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-12-06 15:48:41 -0800
commit4dd2cb33b7603983f2ae9df425b8c0369acc9b61 (patch)
treefab0e58a36b26db8caf809d2b856e66f9952f3b1 /src/bun.js/bindings/glibc-versions-hack.cpp
parent31f025fa02c1c206944effe4395c841fc9e6b2fb (diff)
downloadbun-4dd2cb33b7603983f2ae9df425b8c0369acc9b61.tar.gz
bun-4dd2cb33b7603983f2ae9df425b8c0369acc9b61.tar.zst
bun-4dd2cb33b7603983f2ae9df425b8c0369acc9b61.zip
Ban statx
Diffstat (limited to 'src/bun.js/bindings/glibc-versions-hack.cpp')
-rw-r--r--src/bun.js/bindings/glibc-versions-hack.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/bun.js/bindings/glibc-versions-hack.cpp b/src/bun.js/bindings/glibc-versions-hack.cpp
index 5da0b41fb..345321b94 100644
--- a/src/bun.js/bindings/glibc-versions-hack.cpp
+++ b/src/bun.js/bindings/glibc-versions-hack.cpp
@@ -17,6 +17,22 @@
#endif
#endif
+#if defined(__x86_64__)
+// force older pow
+__asm__(".symver pow,pow@GLIBC_2.2.5");
+#endif
+
+// ban statx, for now
+extern "C" int __wrap_statx(int fd, const char* path, int flags,
+ unsigned int mask, struct statx* buf)
+{
+ errno = ENOSYS;
+#ifdef BUN_DEBUG
+ abort();
+#endif
+ return -1;
+}
+
extern "C" int __real_fcntl(int fd, int cmd, ...);
extern "C" double __real_pow(double x, double y);
extern "C" double __real_exp(double x);