mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-03 21:27:00 +07:00
src/shared/util.h: update qsort_safe() for musl
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This commit is contained in:
parent
cf427188ad
commit
10647c881b
@ -386,10 +386,11 @@ int unlink_noerrno(const char *path);
|
||||
|
||||
static inline void qsort_safe(void *base, size_t nmemb, size_t size,
|
||||
int (*compar)(const void *, const void *)) {
|
||||
if (nmemb) {
|
||||
assert(base);
|
||||
qsort(base, nmemb, size, compar);
|
||||
}
|
||||
if (nmemb <= 1)
|
||||
return;
|
||||
|
||||
assert(base);
|
||||
qsort(base, nmemb, size, compar);
|
||||
}
|
||||
|
||||
int proc_cmdline(char **ret);
|
||||
|
Loading…
Reference in New Issue
Block a user