Compile failure due to use of qsort_r

Paul Barker
2014-04-01T12:03:52Z

Hi all,

I'm using util-linux as part of the OpenEmbedded build system and
we've ran into two places where the use of qsort_r in util-linux is
causing a compile failure:

- CentOS 5.10 is using an old version of glibc which doesn't provide qsort_r

- We're experimenting with musl-libc and this also doesn't provide qsort_r

qsort_r is only used in one place in libfdisk/src/sun.c to my knowledge.

Personally I think a good solution would be to add a configure check
on whether qsort_r is provided and to either error out at that stage
or provide a workaround.

I'm pretty starved for time myself so sadly all I can do is report the failure.

Thanks,

--
Paul Barker

Email: paul@paulbarker.me.uk