/// corrected version, compiles correctly /// #include #include #include //////////////// FIX STARTS HERE /// 1st issue #include /// 2nd issue #ifdef __CYGWIN__ #include #ifdef cfgetospeed #define __cfgetospeed__impl(tp) cfgetospeed(tp) #undef cfgetospeed inline speed_t cfgetospeed(const struct termios *tp) { //return ((tp)->c_ospeed); return __cfgetospeed__impl(tp); } #undef __cfgetospeed__impl #endif /// cfgetospeed is a macro /// 3rd issue #undef __CYGWIN__ #include #define __CYGWIN__ #endif //////////////// FIX ENDS HERE #include int main(int argc, char* argv[]) { return 0; }