From 9bb401d9cdeca01353cec9d63f09c8e4aaed475e Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 25 Jun 2021 15:26:17 +0200 Subject: [PATCH] Add a 'qsort' dummy according to current compiler standards. Detected during the very rare condition of not finding a 'qsort' during the ./configure step. --- src/frontend/parser/std.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/frontend/parser/std.c b/src/frontend/parser/std.c index 3baec4841..8f2541c2c 100644 --- a/src/frontend/parser/std.c +++ b/src/frontend/parser/std.c @@ -16,6 +16,22 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group #ifndef HAVE_QSORT #ifndef qsort -qsort() {} +int compar(const void* a, const void* b); + +int compar(const void* a, const void* b) { + NG_IGNORE(a); + NG_IGNORE(b); + return 0; +} + +void qsort(void* base, size_t num, size_t size, + int (*compar)(const void* a, const void* b)) +{ + NG_IGNORE(base); + NG_IGNORE(num); + NG_IGNORE(size); + NG_IGNORE(compar); +} + #endif #endif