Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions scripts/build/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1385,9 +1385,7 @@ export const linkerFlags: Flag[] = [
// stat-family inline → real symbol (2.33)
"fstat",
"fstat64",
"fstatat",
"fstatat64",
"mknod",
// syscall wrappers (2.27/2.28)
"copy_file_range",
"memfd_create",
Expand Down
2 changes: 1 addition & 1 deletion src/archive/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ pub mod archiver {
}
}

pub use archiver::{Context, ExtractOptions, Plucker};
pub use archiver::{Context, ExtractOptions};

pub trait ArchiveAppender {
/// Mirrors `@hasDecl(Child, "onFirstDirectoryName")`.
Expand Down
2 changes: 0 additions & 2 deletions src/js/internal/streams/native-readable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ interface NativeReadable extends $Node.Readable {
}

interface NativePtr {
onClose: () => void;
onDrain: (chunk: any) => void;
start: (highWaterMark: number) => number;
drain: () => any;
pull: (view: any, closer: any) => any;
Expand Down
12 changes: 1 addition & 11 deletions src/jsc/bindings/workaround-missing-symbols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,27 +405,17 @@ extern "C" int __pthread_key_create(pthread_key_t*, void (*)(void*));
extern "C" int __wrap___pthread_key_create(pthread_key_t* k, void (*d)(void*)) { return __pthread_key_create(k, d); }

// Group B: stat family became real symbols in 2.33. Before that they were
// header inlines around __fxstat*/__xmknod, which still exist at ≤ 2.17.
// header inlines around __fxstat*, which still exist at ≤ 2.17.
extern "C" int __fxstat(int, int, struct stat*);
extern "C" int __fxstat64(int, int, struct stat64*);
extern "C" int __fxstatat(int, int, const char*, struct stat*, int);
extern "C" int __fxstatat64(int, int, const char*, struct stat64*, int);
extern "C" int __xmknod(int, const char*, mode_t, dev_t*);
BUN_SYMVER(__fxstat, BUN_GLIBC_BASE);
BUN_SYMVER(__fxstat64, BUN_GLIBC_BASE);
BUN_SYMVER(__fxstatat, BUN_GLIBC_2_4);
BUN_SYMVER(__fxstatat64, BUN_GLIBC_2_4);
BUN_SYMVER(__xmknod, BUN_GLIBC_BASE);

#ifndef _MKNOD_VER
#define _MKNOD_VER 0
#endif

extern "C" int __wrap_fstat(int fd, struct stat* st) { return __fxstat(_STAT_VER, fd, st); }
extern "C" int __wrap_fstat64(int fd, struct stat64* st) { return __fxstat64(_STAT_VER, fd, st); }
extern "C" int __wrap_fstatat(int dfd, const char* p, struct stat* st, int f) { return __fxstatat(_STAT_VER, dfd, p, st, f); }
extern "C" int __wrap_fstatat64(int dfd, const char* p, struct stat64* st, int f) { return __fxstatat64(_STAT_VER, dfd, p, st, f); }
extern "C" int __wrap_mknod(const char* p, mode_t m, dev_t d) { return __xmknod(_MKNOD_VER, p, m, &d); }

// Group C: thin syscall wrappers added in 2.27/2.28. Kernel has had the
// syscalls since 4.5 (copy_file_range), 3.17 (memfd_create), 4.11 (statx);
Expand Down
14 changes: 3 additions & 11 deletions src/jsc_macros/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub fn host_call(_attr: TokenStream, item: TokenStream) -> TokenStream {
}

// ──────────────────────────────────────────────────────────────────────────
// #[uws_callback] / #[uws_callback(export = "Name", no_catch, thunk = "name")]
// #[uws_callback] / #[uws_callback(export = "Name", no_catch)]
//
// Wraps a `&self` / `&mut self` method in an `extern "C"` thunk suitable for
// registration with uWS / uSockets / any C-ABI callback that round-trips a
Expand Down Expand Up @@ -75,15 +75,14 @@ pub fn host_call(_attr: TokenStream, item: TokenStream) -> TokenStream {
// the caller passed to the C side, and any `(ptr, len)` pair describes a slice
// valid for the duration of the callback.
//
// Generated thunk name defaults to `__<method>_c`; override with `thunk = "x"`.
// The generated thunk is named `__<method>_c`.
// `export = "Sym"` adds `#[unsafe(export_name = "Sym")]` for link-time
// dispatch shims (cycle-break externs).
// ──────────────────────────────────────────────────────────────────────────

#[derive(Default)]
struct UwsCallbackArgs {
export: Option<LitStr>,
thunk: Option<LitStr>,
no_catch: bool,
}

Expand All @@ -98,10 +97,6 @@ impl Parse for UwsCallbackArgs {
input.parse::<Token![=]>()?;
out.export = Some(input.parse()?);
}
"thunk" => {
input.parse::<Token![=]>()?;
out.thunk = Some(input.parse()?);
}
other => {
return Err(syn::Error::new(
ident.span(),
Expand Down Expand Up @@ -222,10 +217,7 @@ fn expand_uws_callback(args: &UwsCallbackArgs, func: &ItemFn) -> syn::Result<Tok
syn::ReturnType::Type(_, t) => quote! { #t },
};

let thunk_ident = match &args.thunk {
Some(l) => format_ident!("{}", l.value()),
None => format_ident!("__{}_c", fn_name),
};
let thunk_ident = format_ident!("__{}_c", fn_name);
let export_attr = args.export.as_ref().map(|l| {
quote! { #[unsafe(export_name = #l)] }
});
Expand Down
2 changes: 1 addition & 1 deletion src/tar/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ pub mod writer;

pub use decoder::{Decoder, MemoryDecoder};
pub use error::{Error, Result};
pub use reader::{Charset, Dialect, Entry, Event, Options, Reader};
pub use reader::{Charset, Dialect, Entry, Event, Options};
Loading