I'm trying to build a. dll file to extend the postgres server with C functions. I'm using visual studio 2012 to build the dll, and PostgreSQL 9.2. I imported all directories postgres "\include\server*" But I'm having the errors:
error C2011: 'timezone': 'struct' type redefinition
error C2011: 'itimerval': 'struct' type redefinition
In the file *pg_confi_os.h* at line 205 and 214
I tried this solution but had no success.
How to solve this problem?
I took a look at this today and found that it's a bug in the PostgreSQL include files. See this mailing list post.
You can work around it by explicitly defining WIN32 in your project file's preprocessor directives.
See my blog post on the topic today
The postgresql team did answer me:
The another answer: