I am trying to use the OpenCA library (libPKI) in a C ++ application. However, when you include the pki_x509_data_st.h file, the following code fragment is encountered:
typedef struct pki_x509_callbacks_st {
void * (*new) (void );
void (*free) (void *x );
void * (*dup) (void *x );
This will not compile due to the "new" pointer declaration.
How can I make it work?
Update
After renaming a "new" variable, I ran into some new problems ("using typedef name after struct", etc.). I want to avoid changing the old C code too much (changing the library headers somehow makes me nervous), so I decided to create a minimal isolation layer.