aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2024-05-26 17:34:45 -0400
committerAndrew Dunstan <andrew@dunslane.net>2024-05-26 17:34:45 -0400
commit7c655a04a2dc84b59ed6dce97bd38b79e734ecca (patch)
tree4392c63d0494dd5d5b8310d15128c422fec2b0d9
parent8285b484a47d829a29fbe0ebe65cdc9f9dfb179d (diff)
downloadpostgresql-7c655a04a2dc84b59ed6dce97bd38b79e734ecca.tar.gz
postgresql-7c655a04a2dc84b59ed6dce97bd38b79e734ecca.zip
Fix meson uuid header check so it works with MSVC
The OSSP uuid.h file includes unistd.h, so to use it with MSVC we need to include the postgres include directories so it picks up our version of that in src/include/port/win32_msvc. Adjust the meson test accordingly.
-rw-r--r--meson.build5
1 files changed, 4 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index f5ca5cfed49..d6401fb8e30 100644
--- a/meson.build
+++ b/meson.build
@@ -1353,7 +1353,10 @@ if uuidopt != 'none'
error('unknown uuid build option value: @0@'.format(uuidopt))
endif
- if not cc.has_header_symbol(uuidheader, uuidfunc, args: test_c_args, dependencies: uuid)
+ if not cc.has_header_symbol(uuidheader, uuidfunc,
+ args: test_c_args,
+ include_directories: postgres_inc,
+ dependencies: uuid)
error('uuid library @0@ missing required function @1@'.format(uuidopt, uuidfunc))
endif
cdata.set('HAVE_@0@'.format(uuidheader.underscorify().to_upper()), 1)