This is an automated email from the ASF dual-hosted git repository. maxyang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit ccb1f189d741fef2c3f87f92a271dbd50ffbbcaa Author: Brent Doil <[email protected]> AuthorDate: Wed Jul 13 09:22:50 2022 -0400 Fix windows clients compilation of libpgcommon The commit https://github.com/greenplum-db/gpdb/commit/ab12230fa11574bf2e7470242489864fe8a63c1b added some WIN32 ifdefs to fix fe-connect compilation errors. The commit https://github.com/greenplum-db/gpdb/commit/5d3dc2e81f272396281eddc082bd998ab96fd0da allows hashfn.c to be compiled into both frontend and backend code but broke the win32 clients compilation with `src\include\utils\elog.h(86): fatal error C1083: Cannot open include file: 'pthread-win32.h': No such file or directory (compiling source file src/common/hashfn.c)` We carry a dependency on pthread_win32.h in elog.h, which causes compilation errors when building Windows clients (as elog.h is included by postgres.h). So use postgres_fe.h instead for this case. Authored-by: Brent Doil <[email protected]> --- src/common/hashfn.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/common/hashfn.c b/src/common/hashfn.c index b54c4b3cdc..d1855c0a0b 100644 --- a/src/common/hashfn.c +++ b/src/common/hashfn.c @@ -27,7 +27,17 @@ * *------------------------------------------------------------------------- */ + +/* + * GPDB: We carry a dependency on pthread_win32.h in elog.h, which causes + * compilation errors when building Windows clients (as elog.h is included by + * postgres.h). So use postgres-fe.h instead for this case. + */ +#if defined (WIN32) && defined (FRONTEND) +#include "postgres_fe.h" +#else #include "postgres.h" +#endif #include "common/hashfn.h" #include "utils/hsearch.h" --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
