tommie / esptool-ck

The ESP8266 build helper tool by Christian Klippel
GNU General Public License v2.0
35 stars 9 forks source link

Build failure in serialport.c:353:22 error: CRTSCTS undeclared #4

Closed gschmottlach closed 9 years ago

gschmottlach commented 9 years ago

FYI -

Under Ubuntu 14.04 (gcc 4.8.2) it fails to build due to CRTSCTS being undefined. This seems to be related to this issue:

http://stackoverflow.com/questions/26944217/crtscts-not-define-when-compiling-as-c99

My fix was to change the Makefile to specify -std=gnu99 instead of -std=c99. There are probably other solutions but this worked for me since I'm using a GNU tool-chain to build it.

tommie commented 9 years ago

Thanks for the report! Could you test current head?

I think gnu99 is not bad but excessive. It's just ensuring there is no RTS/CTS flow control enabled, and if libc doesn't provide the flag, we probably don't have it turned on anyway.

gschmottlach commented 9 years ago

I pulled it down and it compiled cleanly. Works like a champ now. Thanks for the quick fix.

Glenn