lua-periphery: disable for MIPS architectures
PATCH 1/1 lua-periphery: disable for MIPS architectures
c_ispeed and c_ospeed are not available for MIPS:
src/serial.c:191:25: error: 'struct termios' has no member named 'c_ispeed'
termios_settings.c_ispeed = baudrate;
src/serial.c:192:25: error: 'struct termios' has no member named 'c_ospeed'
termios_settings.c_ospeed = baudrate;
Fixes:
http://autobuild.buildroot.net/results/ca7146661c8135568be90dd53b6ee569ebff270d/
--- package/lua-periphery/Config.in | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
package/lua-periphery/Config.in +2 -0
@@ -1,6 +1,8 @@ config BR2_PACKAGE_LUA_PERIPHERY bool "lua-periphery" depends on BR2_PACKAGE_HAS_LUAINTERPRETER + # c_ispeed and c_ospeed are not available for MIPS + depends on !(BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el) help A library for GPIO, SPI, I2C, MMIO, and Serial peripheral I/O interface access in userspace Linux with Lua.
Signature · 1 line
1.7.1
PATCH 1/1 lua-periphery: disable for MIPS architectures
Dear Vicente Olivert Riera,
Quoted 5 lines · Vicente Olivert Riera
c_ispeedandc_ospeedare not available for MIPS:
src/serial.c:191:25: error: 'struct termios' has no member named 'c_ispeed'termios_settings.c_ispeed = baudrate;
Quoted 8 lines
src/serial.c:192:25: error: 'struct termios' has no member named 'c_ospeed'termios_settings.c_ospeed = baudrate;Fixes:
http://autobuild.buildroot.net/results/ca7146661c8135568be90dd53b6ee569ebff270d/
Signed-off-by Vicente Olivert Riera <[email protected]>
I think disabling on MIPS is not the right fix. The right fix is to use the C library cfsetispeed() and cfsetospeed() instead of directly accessing the termios structure members, which are not guaranteed to exist.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 lua-periphery: disable for MIPS architectures
Dear Thomas Petazzoni,
Quoted 13 lines · Thomas Petazzoni
Dear Vicente Olivert Riera,
Quoted 10 lines · Vicente Olivert Riera
c_ispeedandc_ospeedare not available for MIPS:
src/serial.c:191:25: error: 'struct termios' has no member named 'c_ispeed'termios_settings.c_ispeed = baudrate;
src/serial.c:192:25: error: 'struct termios' has no member named 'c_ospeed'termios_settings.c_ospeed = baudrate;Fixes:
Quoted 8 lines
Quoted 3 lines
http://autobuild.buildroot.net/results/ca7146661c8135568be90dd53b6ee569ebff270d/
Signed-off-by Vicente Olivert Riera <[email protected]>I think disabling on MIPS is not the right fix. The right fix is to use the C library
cfsetispeed()andcfsetospeed()instead of directly accessing the termios structure members, which are not guaranteed to exist.
thanks for the advice. I have sent a pull request after testing it fixes the problem. Let's see what happens :-)
https://github.com/vsergeev/c-periphery/pull/1
Best regards,
--
Vincent
Quoted 2 lines
Thomas