Skip to content

Commit

Permalink
Add stubs for qsort and longjmp
Browse files Browse the repository at this point in the history
Those functions are necessary only to compile the bytecode part of the
OCaml compiler so they won’t be called
  • Loading branch information
shym committed Feb 25, 2025
1 parent a6eb56a commit 7a99ebc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nolibc/stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ STUB_WARN_ONCE(int, fclose, 1);
STUB_WARN_ONCE(char *, getenv, NULL);
STUB_WARN_ONCE(char *, secure_getenv, NULL);
STUB_ABORT(system);
STUB_ABORT(qsort);

/* unistd.h */
STUB_WARN_ONCE(int, chdir, -1);
Expand Down Expand Up @@ -150,3 +151,5 @@ STUB_ABORT(pthread_detach);
STUB_IGNORE(int, sigfillset, 0);
STUB_ABORT(sigwait);
STUB_ABORT(usleep);

STUB_ABORT(longjmp);

0 comments on commit 7a99ebc

Please sign in to comment.