diff --git a/include/stdlib.h b/include/stdlib.h --- a/include/stdlib.h +++ b/include/stdlib.h @@ -336,8 +336,12 @@ * historical FreeBSD qsort_r() comparator signature, so applications * written for the historical interface can continue to work without * modification. + * + * We don't apply the workaround for TCC, since it doesn't support + * symbol versioning. */ -#if defined(__generic) || defined(__cplusplus) +#ifndef __TCC__ +#if (defined(__generic) || defined(__cplusplus)) void __qsort_r_compat(void *, size_t, size_t, void *, int (*)(void *, const void *, const void *)); __sym_compat(qsort_r, __qsort_r_compat, FBSD_1.0); @@ -356,6 +360,7 @@ } __BEGIN_DECLS #endif +#endif /* __TCC__ */ extern char *suboptarg; /* getsubopt(3) external variable */ #endif /* __BSD_VISIBLE */