Cross compilation for mips architecture using openwrt

Hi guys,
I have been working on to design own LoRaWAN Gateway using openwrt. There is a software packet for forwarding receive mesagges from RF. If i build these packet using gcc for x86 ubuntu machine , it built succesfully but i must build for mips architecture.

When i tried cross compile this packet using mipsel-openwrt-linux-gcc , i faced make error linked below.

Any suggestion would be appriciated. Thank you.

You will have to fix your source, qsort_r() is not defined by POSIX/ SUSv4 and not provided by musl.

Actually the main is problem how can i fix it