Why gcc gives warning: implicit declaration of function qsort_r?
c, gcc
Solution
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.
Problem
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)`