Hi Everyone!
I'm back working on this problem again...
On 20/10/14 11:55, Etienne Millon wrote:
> * Daniel Lintott <daniel@serverb.co.uk> [141020 12:38]:
>> Okay.. that points me in the direction of the the
>> common/dynamips_common.h line 83 [1].
>>
>>> #ifndef _unused
>>> /* Function that is never used */
>>> #define _unused __attribute__((unused))
>>> #endif
>>
>> Any ideas on where to go from here?
>
> Hi,
>
> I think that you can patch utils.h (and possibly other dynamips
> headers) so that it includes "dynamips_common.h" only after loading
> system includes (not tested). That way "_unused" will be undefined at
> the time sigcontext.h is included.
>
So I have moved all the dynamips_common.h includes to after the system
includes and got a lot further but have hit the error again later on in
the build :(
commit b4daab223d4d3d35075cd7d5290bb5e72f99b522
Author: Daniel Lintott <daniel@serverb.co.uk>
Date: Mon Oct 27 17:31:44 2014 +0000
Import dynamips_common.h after importing system headers
:100644 100644 fd06b39... 466ff40... M common/dev_vtty.c
:100644 100644 090e772... 1640b73... M common/net.h
:100644 100644 7b52845... ef04385... M common/net_io.c
:100644 100644 20a3645... 732bd78... M common/utils.c
:100644 100644 86309b9... 006bad6... M stable/hypervisor.c
:100644 100644 4e5a8b0... 9f4a294... M stable/utils.h
:100644 100644 10ecfbb... 9447cb0... M unstable/hypervisor.c
:100644 100644 9305935... 4109169... M unstable/utils.h
And the build error I now hit:
> In file included from /usr/include/powerpc-linux-gnu/bits/sigcontext.h:28:0,
> from /usr/include/signal.h:339,
> from /home/daniel/workspace/dynamips/stable/utils.h:11,
> from /home/daniel/workspace/dynamips/common/dev_vtty.c:29:
> /usr/include/powerpc-linux-gnu/asm/sigcontext.h:17:23: error: expected identifier or ‘(’ before ‘[’ token
> (Though it is also quite bad that "_unused" is in global scope in the
> first place IMHO.)
>
Can anyone elaborate on this? I understand the what is being said here,
but my C skills aren't at that level! Can the scope be changed, so it's
not in the global scope... or would it be a matter of choosing a
different name for that definition.
Cheers
Daniel
Attachment:
signature.asc
Description: OpenPGP digital signature