If you get an error message about FIONREAD it means that your cpp is not working right. If you are using gcc you must use -traditional-cpp option.