--- a/loginutils/getty.c
+++ b/loginutils/getty.c
@@ -271,7 +271,9 @@ static void termios_init(int speed)
 #ifdef CMSPAR
 		| CMSPAR  /* mark or space parity */
 #endif
+#ifdef CBAUD
 		| CBAUD   /* (output) baud rate */
+#endif
 #ifdef CBAUDEX
 		| CBAUDEX /* (output) baud rate */
 #endif