Building ispell on OSX Mavericks

I wanted to add spell-checking to my emacs install on the Macbook Pro. Emacs was installed from the extremely helpful emacs for mac osx site.

N.B I'd had to upgrade emacs to a latest nightly build to overcome two problems since upgrading to Mavericks:

I downloaded ispell 3.3.02, (somewhat disheartened to learn it was last updated in 2005) and attempted to compile it. A number of errors prevented the build, all related to getline in correct.c. Looks like OSX has introduced it's own getline at some point in the last eight years. The error was:

  correct.c:248:15: error: static declaration of 'getline' follows non-static
  static char *   getline P ((char * buf, int bufsize));
  /Applications/ note: 
        previous declaration is here
  ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restri...

I renamed the ispell getline in correct.c to is_getline and all was well.