I solved the RAND_MAX variable error by adding
at the top of background.c. I don't know if this was the right way to do this, but it worked... My ctrulib is the latest version(installed from git) but I don't have a CTRULIB environmental variable set(unless it does so in the Makefile when installing, but that's unlikely)
Code:
#include