From: Xiao Yang <yangx.jy@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] sctp/sctp_big_chunk.c: Fix compiler error
Date: Wed, 4 Apr 2018 17:55:39 +0800 [thread overview]
Message-ID: <5AC4A11B.5010205@cn.fujitsu.com> (raw)
In-Reply-To: <20180404094556.2eahiw2z4sz3y3r5@dell5510>
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
>
>
> .
>
next prev parent reply other threads:[~2018-04-04 9:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-04 8:52 [LTP] [PATCH] sctp/sctp_big_chunk.c: Fix compiler error Xiao Yang
2018-04-04 9:45 ` Petr Vorel
2018-04-04 9:55 ` Xiao Yang [this message]
2018-04-04 10:46 ` Alexey Kodanev
2018-04-04 11:12 ` [LTP] [PATCH v2] " Xiao Yang
2018-04-04 13:04 ` Alexey Kodanev
2018-04-04 11:16 ` [LTP] [PATCH] " Xiao Yang
2018-04-04 9:57 ` Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5AC4A11B.5010205@cn.fujitsu.com \
--to=yangx.jy@cn.fujitsu.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.