commit 6909918af77cb8cc39bdad12c51543e16f8297a9
Author: Paul Wouters <[email protected]>
Date: Mon Feb 11 19:26:40 2019 -0500
pluto: removal all but one include of proposals.h
Since connections.h needs it, and that is included everywhere else,
there is no need for separate includes.
If this becomes a trend, this is terrible.
In this particular case, it seems forced:
struct connection has:
struct ike_proposals ike_proposals;
struct child_proposals child_proposals;
so the compiler needs to know the size of those two structs when struct
connection is defined.
For v2, the problem is avoided by using struct pointers:
struct ikev2_proposals *v2_ike_proposals;
struct ikev2_proposals *v2_ike_auth_child_proposals;
struct ikev2_proposals *v2_create_child_proposals;
C allows struct pointers to be used without having a definition of the
struct "visible".
Perhaps the v1 code should follow the v2 code's approach.
I don't know if that would eliminate the need for connection.h including
proposals.h
_______________________________________________
Swan-dev mailing list
[email protected]
https://lists.libreswan.org/mailman/listinfo/swan-dev