* [Buildroot] [PATCH] lua-periphery: disable for MIPS architectures
@ 2015-03-17 11:47 Vicente Olivert Riera
2015-03-17 12:09 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Vicente Olivert Riera @ 2015-03-17 11:47 UTC (permalink / raw)
To: buildroot
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/
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
package/lua-periphery/Config.in | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/package/lua-periphery/Config.in b/package/lua-periphery/Config.in
index de5a716..0ccb05c 100644
--- a/package/lua-periphery/Config.in
+++ b/package/lua-periphery/Config.in
@@ -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.
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] lua-periphery: disable for MIPS architectures
2015-03-17 11:47 [Buildroot] [PATCH] lua-periphery: disable for MIPS architectures Vicente Olivert Riera
@ 2015-03-17 12:09 ` Thomas Petazzoni
2015-03-17 13:20 ` Vicente Olivert Riera
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2015-03-17 12:09 UTC (permalink / raw)
To: buildroot
Dear Vicente Olivert Riera,
On Tue, 17 Mar 2015 11:47:39 +0000, Vicente Olivert Riera wrote:
> 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/
>
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] lua-periphery: disable for MIPS architectures
2015-03-17 12:09 ` Thomas Petazzoni
@ 2015-03-17 13:20 ` Vicente Olivert Riera
0 siblings, 0 replies; 3+ messages in thread
From: Vicente Olivert Riera @ 2015-03-17 13:20 UTC (permalink / raw)
To: buildroot
Dear Thomas Petazzoni,
On 17/03/15 13:09, Thomas Petazzoni wrote:
> Dear Vicente Olivert Riera,
>
> On Tue, 17 Mar 2015 11:47:39 +0000, Vicente Olivert Riera wrote:
>> 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/
>>
>> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
>
> 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.
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
> Thomas
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-17 13:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-17 11:47 [Buildroot] [PATCH] lua-periphery: disable for MIPS architectures Vicente Olivert Riera
2015-03-17 12:09 ` Thomas Petazzoni
2015-03-17 13:20 ` Vicente Olivert Riera
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox