[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C library problem



On Tue, Apr 24, 2001 at 09:08:25AM -0700, Dragan Stancevic wrote:

Can anyone with an LX board try to compile this code for me, and let me know
if it works, it doesn't work on my etrax100 board? It fails during linking.

> 
> Can anyone try to compile this code and and see if it works on devboard LX?
> 
> #include <dirent.h>
> 
> int sort_dir(char *path){
>     int err;
>     struct dirent **nlist;
>  
>     err = scandir(path, &nlist, 0, alphasort);
>  
>     if (err < 0){
>         perror(__FUNCTION__);
>         return errno;
>     }
>     else
>         while(err--) printf("%s\n", nlist[err]->d_name);
>  
>     return 0;
> }  
> 
> int main(){
> 	sort_dir(".");
> 	return 0;
> }

-- 
                                    | 1. Wild enthusiam
Historic Project Stages for all     | 2. Gradual disillusionment
Silicon Valley Projects.            | 3. Search for the guilty
                                    | 4. Punishment of the innocents
Where are you at?                   | 5. Promotion of non-participants