Try to fix build on Linux.
* Linux is the only one of our supported build hosts to not have mergesort. Provide an implementation that calls qsort, since the qsort implementation in the glibc used by Linux uses a mergesort (!) for small arrays.
This commit is contained in:
@@ -69,3 +69,14 @@ snooze_until(bigtime_t time, int timeBase)
|
||||
{
|
||||
return snooze(time - system_time());
|
||||
}
|
||||
|
||||
|
||||
#ifdef __linux__
|
||||
// Linux is the only system out there to not have this...
|
||||
int mergesort(void* base, size_t count, size_t size,
|
||||
int (*compare)(const void *, const void *))
|
||||
{
|
||||
qsort(base, count, size, compare);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user