mtangoo / wxDatabase

wxWidgets library for connecting to major relational database
http://mtangoo.github.io/database/index.html
37 stars 17 forks source link

Redefinition of struct timespec (PostgreSQL vs mingw-w64) #11

Closed iwbnwif closed 9 years ago

iwbnwif commented 9 years ago

This is not really a wxDatabase issue, but a PostgreSQL / mingw-w64 issue. I am including it here because it prevents wxDatabase from building and there is not much help on Google at the moment.

Basically both PostgreSQL pthread.h and mingw-w64 gthr.h define the struct timespec.

The workaround from a wxDatabase perspective is to include:

    add_definitions(-DHAVE_STRUCT_TIMESPEC)

in the ENABLE_PGS block of CMakeLists.txt.

mtangoo commented 9 years ago

Thanks for reporting. I will add that today in a new commit I want to make. I hope you will test to see that the issue does not exist