I've seen a few posts where people have reported compile errors when -std=c99 is defined for gcc. Here are two minor changes that can be made and the code compiles without warning or error for C99:
1) In bcm2835.c before all the #includes add this line...
#define _POSIX_C_SOURCE 200809L
2) In bcm2835.h add this line:
#include <fcntl.h>
May be these can go in a future release?