Skip to content

Commit 869b8d4

Browse files
committed
Fix the compilation of termios_conversion with esperanto
The last release of esperanto does not define speed_t constants. We must protect the definition of our speed_t table when the toolchain is esperanto.
1 parent e10e2b8 commit 869b8d4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/unix/unix_c/unix_termios_conversion.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,21 @@ struct speed_t {
4141
int baud;
4242
};
4343

44+
/* XXX(dinosaure): esperanto **does not** defines [speed_t] constants. */
45+
4446
long _speedtable(struct speed_t dst[]) {
4547
struct speed_t speedtable[] = {
48+
#ifndef __ESPERANTO__
4649
{B50, 50},
4750
{B75, 75},
4851
{B110, 110},
4952
{B134, 134},
5053
{B150, 150},
54+
#endif // __ESPERANTO__
5155
#ifdef B200
5256
{B200, 200},
5357
#endif
58+
#ifndef __ESPERANTO__
5459
{B300, 300},
5560
{B600, 600},
5661
{B1200, 1200},
@@ -60,6 +65,7 @@ long _speedtable(struct speed_t dst[]) {
6065
{B9600, 9600},
6166
{B19200, 19200},
6267
{B38400, 38400},
68+
#endif // __ESPERANTO__
6369
#ifdef B57600
6470
{B57600, 57600},
6571
#endif
@@ -69,7 +75,9 @@ long _speedtable(struct speed_t dst[]) {
6975
#ifdef B230400
7076
{B230400, 230400},
7177
#endif
78+
#ifndef __ESPERANTO__
7279
{B0, 0},
80+
#endif // __ESPERANTO__
7381

7482
/* Linux extensions */
7583
#ifdef B460800

0 commit comments

Comments
 (0)