mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-08 14:02:55 +00:00
Build changes to make communicator build on macos.
This commit is contained in:
@@ -28,6 +28,7 @@ OBJS = \
|
||||
PG_CPPFLAGS = -I$(libpq_srcdir)
|
||||
SHLIB_LINK_INTERNAL = $(libpq)
|
||||
SHLIB_LINK = -lcurl
|
||||
SHLIB_LINK += -framework Security -framework CoreFoundation -framework CoreServices -framework IOKit -framework SystemConfiguration
|
||||
|
||||
EXTENSION = neon
|
||||
DATA = \
|
||||
|
||||
@@ -37,3 +37,10 @@ utils.workspace = true
|
||||
|
||||
[build-dependencies]
|
||||
cbindgen.workspace = true
|
||||
|
||||
[target.'cfg(target_os = "macos")']
|
||||
rustflags = [
|
||||
"-l", "framework=Security",
|
||||
"-l", "framework=CoreFoundation",
|
||||
"-l", "framework=CoreServices",
|
||||
]
|
||||
|
||||
@@ -2,6 +2,10 @@ use std::env;
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
|
||||
println!("cargo:rustc-link-lib=framework=Security");
|
||||
println!("cargo:rustc-link-lib=framework=CoreFoundation");
|
||||
println!("cargo:rustc-link-lib=framework=CoreServices");
|
||||
println!("cargo:rustc-link-lib=framework=IOKit");
|
||||
|
||||
cbindgen::generate(crate_dir).map_or_else(
|
||||
|error| match error {
|
||||
|
||||
@@ -342,7 +342,7 @@ callback_set_my_latch_unsafe(void)
|
||||
* FIXME: The logic from neon_get_request_lsns() needs to go here, except for
|
||||
* the last-written LSN cache stuff, which is managed by the rust code now.
|
||||
*/
|
||||
uint64
|
||||
uint64_t
|
||||
callback_get_request_lsn_unsafe(void)
|
||||
{
|
||||
/*
|
||||
@@ -659,7 +659,7 @@ retry:
|
||||
ereport(ERROR,
|
||||
(errcode_for_file_access(),
|
||||
errmsg("could not read block %lu in local cache file: %m",
|
||||
cached_block)));
|
||||
(unsigned long)cached_block)));
|
||||
bytes_total += nbytes;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user