[OTR-dev] Self-referencing structure

Ian Goldberg ian at cypherpunks.ca
Thu Apr 13 15:22:05 EDT 2006

On Thu, Apr 13, 2006 at 01:57:51PM -0500, Twan Fox wrote:
> Greetings,
> While I understand that most don't work with Visual Studio .Net, I am 
> running into a problem with that compiler as it relates to the Trillian 
> OTR plugin I am writing. Specifically, this segment of code from the 
> context.h file is giving it/me fits:
> typedef struct fingerprint {
>    struct fingerprint *next;          /* The next fingerprint in the 
> list */
>    struct fingerprint **tous;         /* A pointer to the pointer to us */
>    unsigned char *fingerprint;        /* The fingerprint, or NULL */
>    struct context *context;           /* The context to which we belong */
>    char *trust;                       /* The trust level of the 
> fingerprint */
> } Fingerprint;

Try changing the three instances of "struct fingerprint" to
"struct _fingerprint".

Someone suggested this a while back, but it didn't make it into CVS.
Let us know if that works, and if it does, I'll check it in.  The rest
of the code references this type by its typedef "Fingerprint", so the
struct name is completely arbitrary.

   - Ian

More information about the OTR-dev mailing list