[LTP] [PATCH] sctp/sctp_big_chunk.c: Fix compiler error

Xiao Yang yangx.jy@cn.fujitsu.com
Wed Apr 4 11:55:39 CEST 2018


On 2018/04/04 17:45, Petr Vorel wrote:
> Hi Xiao,
>
>> On old distros(e.g. RHEL5), Compilation failed because of redefinitions
>> from linux/sctp.h(including linux/in.h) and netinet/in.h, as below:
>> ----------------------------------------------------------------------
>> In file included from /usr/include/linux/sctp.h:54,
>>                   from ../../../include/lapi/sctp.h:22,
>>                   from sctp_big_chunk.c:35:
>> /usr/include/linux/in.h:26: error: redeclaration of enumerator ‘IPPROTO_IP’
>> /usr/include/netinet/in.h:33: error: previous definition of ‘IPPROTO_IP’ was here
>> ...
>> ----------------------------------------------------------------------
>> 1) There was a existed netinet/sctp.h based on lksctp-tools-devel package
>>     in LTP, so we used netinet/sctp.h to fix it as the sctp tests did.
>> 2) We removed lapi/sctp.h and duplicated SOL_SCTP in lapi/socket.h.
>> Signed-off-by: Xiao Yang<yangx.jy@cn.fujitsu.com>
>> ---
> Thank you for the fix. I'd prefer to remove our utils/sctp/include/netinet/sctp.h (I don't
> think it's a good idea to copy headers into source code) and fix include/lapi/sctp.h
> header trying first include<netinet/sctp.h>  (with autotools check) and then
> <linux/sctp.h>  if the previous is not available, as Alexey suggested [1].
Hi Petr,

If only<linux/sctp.h>  is provided on RHEL5, it seems that the redefinition problem still exists.

Thanks,
Xiao Yang.

> What do you think, Alexey?
>
>
> Kind regards,
> Petr
>
> [1] http://lists.linux.it/pipermail/ltp/2018-March/007517.html
>
>
> .
>





More information about the ltp mailing list