I'm trying to use the OpenCA (libPKI) library in a C++ application. However, when including the file pki_x509_data_st.h the following code fragment is encountered:
typedef struct pki_x509_callbacks_st {
/* ---------------- Memory Management -------------------- */
void * (*new) (void );
void (*free) (void *x );
void * (*dup) (void *x );
This won't compile because of the "new" pointer declaration.
How can I make it work?
Update
After renaming the "new" variable I've encountered some new problems ("using typedef name after struct" etc.. ). I want to avoid changing too much of the old C code (modifying library headers somehow makes me feel nervous) so I decided just create a minimal isolation layer instead.