The generic code has __ispeed and __ospeed; Linux has c_ispeed and
c_ospeed. Use an anonymous union member to allow both set of names on
all platforms.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
cc_t c_cc[NCCS];
/* Input and output baud rates. */
- speed_t __ispeed, __ospeed;
+ __extension__ union {
+ speed_t __ispeed;
+ speed_t c_ispeed;
+ };
+#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
+ __extension__ union {
+ speed_t __ospeed;
+ speed_t c_ospeed;
+ };
+#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
};
#define _IOT_termios /* Hurd ioctl type field. */ \
tcflag_t c_lflag; /* local mode flags */
cc_t c_cc[NCCS]; /* control characters */
cc_t c_line; /* line discipline (== c_cc[33]) */
- speed_t c_ispeed; /* input speed */
- speed_t c_ospeed; /* output speed */
+ /* Input and output baud rates. */
+ __extension__ union {
+ speed_t __ispeed;
+ speed_t c_ispeed;
+ };
#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
+ __extension__ union {
+ speed_t __ospeed;
+ speed_t c_ospeed;
+ };
#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
};
tcflag_t c_lflag; /* local mode flags */
cc_t c_line; /* line discipline */
cc_t c_cc[NCCS]; /* control characters */
- speed_t c_ispeed; /* input speed */
- speed_t c_ospeed; /* output speed */
+ /* Input and output baud rates. */
+ __extension__ union {
+ speed_t __ispeed;
+ speed_t c_ispeed;
+ };
#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
+ __extension__ union {
+ speed_t __ospeed;
+ speed_t c_ospeed;
+ };
#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
};