Good to hear. The iconv thing really should be a cast. Unluckily GCC has changed how casts are done and I forget the specifics.
Depending on what else you might do, you might want to put poll.h back. I had a compile fail yesterday due to a missing poll.h
Still strange you had the math problem.