From 4dd2cb33b7603983f2ae9df425b8c0369acc9b61 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Tue, 6 Dec 2022 15:48:41 -0800 Subject: Ban statx --- src/bun.js/bindings/glibc-versions-hack.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/bun.js/bindings/glibc-versions-hack.cpp') 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); -- cgit v1.2.3