This is fixed by adding #include "config.h"
to ...yaml/api.c
.
But then there arise other, different errors later.
I can't understand why incorrect source code is published by the ruby developers.
Edit with more information:
It seems that certain defines are missing (failure by configure?). The other errors were fixed by adding
#define HAVE_IFADDRS_H 1
#define HAVE_NET_IF_H 1
to ext/socket/rubysocket.h
. After these fixes the compilation ran fine.