Alternative to ls -R in C

Status
Not open for further replies.

Jacopx

Patron
Joined
Feb 19, 2016
Messages
367
Buonasera a tutti! :)

I'm trying to write in C an alternative to the command:
Code:
ls -R


I don't like too much the output generated. I have written my code on my UNIX machine and it's working. If i'm trying to compile it in FreeNAS this error occurs:
Code:
[root@FreeNAS] /mnt/WDVolume_A/Plex_Media# gcc main.c -o list.exe

In file included from /usr/local/lib/gcc48/gcc/x86_64-portbld-freebsd10.3/4.8.5/include-fixed/unistd.h:46:0,

				from main.c:1:

/usr/local/lib/gcc48/gcc/x86_64-portbld-freebsd10.3/4.8.5/include-fixed/sys/types.h:53:28: fatal error: machine/endian.h: No such file or directory

 #include <machine/endian.h>

							^

compilation terminated.



I think is related to the library but i can't understand the: "#include <machine/endian.h>".
Here you can find the code: https://github.com/Jacopx/ls--R-alternative
 
Status
Not open for further replies.
Top