I know that the error is bogus because I was able to successfully build and run the project from the cygwin command line.
The exact error message is
"fatal error: sys/socket.h: No such file or directory".
Well, the file does exist in cygwin and I have no problem with it on most of the projects that I build with CodeBlocks. Curiously, this project was originally set for the GNU GCC compiler (MinGW).
I'm using the latest nightly build and Codeblocks self reports its version as 8150.