make server compile, add a bunch of externs.