diff options
author | 2022-12-06 14:14:27 -0800 | |
---|---|---|
committer | 2022-12-06 14:14:27 -0800 | |
commit | 81317a52ea13b39de22d2cdeff8ecc231224f9e7 (patch) | |
tree | 677bc306ab6b56937f024a5bdf3e8b624b7137c6 /src/bun.js/bindings/BunJSCModule.cpp | |
parent | 7d29782896f31ae5249f00e9505fd978e9733644 (diff) | |
download | bun-81317a52ea13b39de22d2cdeff8ecc231224f9e7.tar.gz bun-81317a52ea13b39de22d2cdeff8ecc231224f9e7.tar.zst bun-81317a52ea13b39de22d2cdeff8ecc231224f9e7.zip |
Fix glibc symbol version issues preventing `bun install` from being used in older glibc versions (#1580)
* Prevent integer overflow in connectError
* Add missing deepEquals() type to Bun
* fix missing glibc symbols
* Fix missing symbol issues
* Try this
* Update glibc-versions-hack.cpp
* Update glibc-versions-hack.cpp
* Update glibc-versions-hack.cpp
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/bun.js/bindings/BunJSCModule.cpp')
-rw-r--r-- | src/bun.js/bindings/BunJSCModule.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bun.js/bindings/BunJSCModule.cpp b/src/bun.js/bindings/BunJSCModule.cpp index 92eefd106..a89bba52a 100644 --- a/src/bun.js/bindings/BunJSCModule.cpp +++ b/src/bun.js/bindings/BunJSCModule.cpp @@ -252,6 +252,8 @@ JSC_DEFINE_HOST_FUNCTION(functionNeverInlineFunction, (JSGlobalObject * globalOb return JSValue::encode(setNeverInline(globalObject, callFrame)); } +extern "C" bool Bun__mkdirp(JSC::JSGlobalObject*, const char*); + JSC_DECLARE_HOST_FUNCTION(functionStartSamplingProfiler); JSC_DEFINE_HOST_FUNCTION(functionStartSamplingProfiler, (JSC::JSGlobalObject * globalObject, JSC::CallFrame* callFrame)) { @@ -267,11 +269,13 @@ JSC_DEFINE_HOST_FUNCTION(functionStartSamplingProfiler, (JSC::JSGlobalObject * g auto path = directoryValue.toWTFString(globalObject); if (!path.isEmpty()) { StringPrintStream pathOut; - if (!WTF::FileSystemImpl::makeAllDirectories(path)) { + const char* optionCString = toCString(String(optionString + path)).data(); + + if (!Bun__mkdirp(globalObject, optionCString)) { throwVMError(globalObject, scope, createTypeError(globalObject, "directory couldn't be created"_s)); return JSC::JSValue::encode(jsUndefined()); } - const char* optionCString = toCString(String(optionString + path)).data(); + Options::setOption(optionCString); samplingProfiler.registerForReportAtExit(); } |