I do include<stdlib.h>
where qsort_r is given. And I use gcc -std=c99 -O3 myfun.c -o myfun
to compile.
It compiles, links and runs well. I don't know why I got this warning and what is potential risk of this warning ?
BTW, my compiler is gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)
It does so because you use -std=c99
, there's no qsort_r function in stdlib.h in c99.
Use -std=gnu99
to make the extensions available, or add a #define _GNU_SOURCE
to your source files before including the header files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With