#318·darknet

Compilation Error : "unknown type name 'fd_set'

Author: yogeekCreated Nov 17, 2017Updated Apr 11, 2025

When calling make after cloning the repo, i have the following error :

gcc
./examples/go.c: In function 'stdin_ready':
./examples/go.c:786:5: error: unknown type name 'fd_set'
     fd_set readfds;
     ^
compilation terminated due to -Wfatal-errors.
make: *** [obj/go.o] Error 1
Makefile:85: recipe for target 'obj/go.o' failed

Environment : alpine 3.4

I found that this was because this import was missing in the file exemples/go.c : #include <sys/select.h>

After adding it, compilation is ok