SCTP Discussions

Text archives Help


Re: [SCTP-Discussion] socket api error


Chronological Thread 
  • From: rcl AT ihug.co.nz
  • To: "Julio Kriger" <juliokriger AT gmail.com>, discussion AT sctp.de
  • Subject: Re: [SCTP-Discussion] socket api error
  • Date: Mon May 29 01:42:01 2006
  • List-id: SCTP Discussions <discussion.sctp.de>
  • Priority: normal

I'm guessing that you're building with a recent version of
GCC.

GCC 4 tightened up the behaviour of friend declarations v.
forward declarations.

Add the lines:

class SCTPSocket;
class SCTPConnectionlessSocket;
class SCTPSocketMaster;

somewhere near the start of sctpassociation.h.

You will also need to add

class SCTPSocketMaster;
class SCTPAssociation;

near the start of sctpsocket.h.

Patch below (was originally posted a couple of days ago).

Cheers,
Ralph


> sctpassociation.h:429: error: expected `)' before '*'
> token sctpassociation.h:439: error: ISO C++ forbids
> declaration of 'SCTPSocket' with no type
> sctpassociation.h:439: error: expected ';' before '*'
> token
>
>
>
> --
> --
> Stewie: [After Lois tries to feed Stewie his broccoli
> "airplane style"] Damn you, Damn the Broccoli, and Damn
> the Wright Brothers. ----------------------------
> Julio Kriger
> mailto:juliokriger AT gmail.com
>
Index: socketapi-1.7.0/socketapi/sctpassociation.h
===================================================================
--- socketapi-1.7.0/socketapi/sctpassociation.h.orig
+++ socketapi-1.7.0/socketapi/sctpassociation.h
@@ -75,7 +75,9 @@ struct AssocIODefaults
    unsigned int Context;
 };
 
-
+class SCTPSocket;
+class SCTPConnectionlessSocket;
+class SCTPSocketMaster;
 
 /**
   * This class manages a SCTP assocation. Note: The constructor is protected,
Index: socketapi-1.7.0/socketapi/sctpsocket.h
===================================================================
--- socketapi-1.7.0/socketapi/sctpsocket.h.orig
+++ socketapi-1.7.0/socketapi/sctpsocket.h
@@ -50,6 +50,8 @@
 #include <sctp.h>
 #include <map>
 
+class SCTPSocketMaster;
+class SCTPAssociation;
 
 /**
   * This class manages a SCTP socket (SCTP instance).
@@ -577,7 +579,7 @@ class SCTPSocket
    private:
    void checkAutoConnect();
    void checkAutoClose();
-   SCTPAssociation* SCTPSocket::findAssociationForDestinationAddress(
+   SCTPAssociation* findAssociationForDestinationAddress(
                        multimap<unsigned int, SCTPAssociation*>& list,
                        const SocketAddress** destinationAddressList);
 



Archive powered by MHonArc 2.6.19+.

Top of page