modbus team mailing list archive
-
modbus team
-
Mailing list archive
-
Message #00013
Re: libmodbus on ARM
2011/7/12 Alex Stapleton <alexs@xxxxxxxxxxxxx>:
> On 12/07/2011 01:30, Justin Findlay wrote:
>>
>> On Mon, Jul 11, 2011 at 5:33 PM, Justin Findlay<jfindlay@xxxxxxxxx>
>> wrote:
>>>
>>> I'm trying to compile libmodbus-2.9.4 on an ARM system
>>> (http://www.embeddedarm.com/products/board-detail.php?product=TS-7260),
>>> but I'm getting an error:
>>
>>> I've not used C in a very long time, but this seems to be a simple
>>> syntax problem. (Perhaps a compatibility issue between different C
>>> standards?) I'll keep trying to figure it out myself, but I would
>>> appreciate some help. Thanks.
>>
>> It appears that neither linux/serial.h nor any other similar files
>> define serial_rs485 on my debian etch arm system.
>>
>
> I am using Debian Squeeze and linux/serial.h defines SER_RS485_ENABLED as
> does the armel cross-compile variant.
>
> The emdebian cross compile headers appear to be bugged though. I have to
> manuually #include <asm-generic/ioctls.h>
> to get the required TIOC... #define.
>
> It would seem that the RS485 code that's been put into libmodbus could use
> some ifdefs for better platform compatibility.
>
>
It's already the case (since one month) on github:
#if defined(HAVE_DECL_TIOCSRS485)
#include <sys/ioctl.h>
#include <linux/serial.h>
#endif
Could test again with 3.0.0 release, please?
Follow ups
References