Merge branch '3887_endianness'

* 3887_endianness:
  Ticket #3887: (handle_console_linux): fix endianness bug.
This commit is contained in:
Andrew Borodin 2021-11-21 14:50:39 +03:00
commit b8262f22e8

View File

@ -241,7 +241,13 @@ handle_console_linux (console_action_t action)
return;
}
/* Send command to the console handler */
status = write (pipefd1[1], &action, 1);
{
/* Convert enum (i.e. int) to char to write the correct value
* (the least byte) regardless of machine endianness. */
char act = (char) action;
status = write (pipefd1[1], &act, 1);
}
if (action != CONSOLE_DONE)
{
/* Wait the console handler to do its job */