Prasadcse Perera wrote:
Hi, The rampart module tends to give redefinition errors when it compiles with the project space for the structs, rampart_replay_detector and rampart_sct_provider. After went through the code I found out this is because of using these structs in rampart_context. The two implementations of rampart_replay_detector and rampart_sct_provider both has rampart_context.h header inclusion so when the rampat_context uses these structs, only the context source file have the header inclusion of rampart_replay_detector and rampart_sct_provider. This has avoid the circular dependency but rampart_context has some methods which returns rampart_replay_detector and rampart_sct_provider structs which declared as "struct rampart_replay_detector_t*". This also leads to a success build but gives errors as it tends to redefine the two structures. So instead of returning "struct rampart_replay_detector_t", it can solve this by returning void" pointers. Also in these methods, the return values are casted to void* so I think that the header files are mistakenly written to return "struct rampart_replay_detector_t" and "struct rampart_sct_provider_t". Please correct me if I'm wrong !.
+1 for returning void*. I'll modify and commit. Please verify. Regards, Shankar.