mirror of
https://github.com/sheumann/hush.git
synced 2024-08-20 19:29:02 +00:00
microcom: undo #define trick, gcc fails to take advantage of it
This commit is contained in:
parent
b5c60fc787
commit
0effc2410b
@ -45,8 +45,8 @@ int microcom_main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
struct pollfd pfd[2];
|
struct pollfd pfd[2];
|
||||||
int nfd;
|
int nfd;
|
||||||
//int sfd;
|
int sfd;
|
||||||
#define sfd (pfd[0].fd)
|
/* #define sfd (pfd[0].fd) - gcc 4.2.1 is still not smart enough */
|
||||||
char *device_lock_file;
|
char *device_lock_file;
|
||||||
const char *opt_s = "9600";
|
const char *opt_s = "9600";
|
||||||
speed_t speed;
|
speed_t speed;
|
||||||
@ -123,7 +123,7 @@ int microcom_main(int argc, char **argv)
|
|||||||
goto restore0_close_unlock_and_exit;
|
goto restore0_close_unlock_and_exit;
|
||||||
|
|
||||||
// main loop: check with poll(), then read/write bytes across
|
// main loop: check with poll(), then read/write bytes across
|
||||||
/* pfd[0].fd = sfd; - they are the same */
|
pfd[0].fd = sfd;
|
||||||
pfd[0].events = POLLIN;
|
pfd[0].events = POLLIN;
|
||||||
pfd[1].fd = STDIN_FILENO;
|
pfd[1].fd = STDIN_FILENO;
|
||||||
pfd[1].events = POLLIN;
|
pfd[1].events = POLLIN;
|
||||||
|
Loading…
Reference in New Issue
Block a user