Update relay.c

Fixing compiling errors