The multi-line macro beginning on line 22 of p3dout.c is missing an end bracket. It currently reads (ignoring whitespace)
fprintf (stderr, "Fortran unformatted output not supported for %s machine\n", bf_machname (MACH_LOCAL);
but should read
fprintf (stderr, "Fortran unformatted output not supported for %s machine\n", bf_machname (MACH_LOCAL));
On OS X, the MACH_LOCAL variable is not defined so I ended up using a hack and changing the line to
fprintf (stderr, "Fortran unformatted output not supported\n");