Skip to content

Commit

Permalink
Allow compilation on OpenBSD (#359)
Browse files Browse the repository at this point in the history
* allow compilation on OpenBSD

* use option_env! instead of env!
  • Loading branch information
ledeuns authored Apr 19, 2022
1 parent 2075d0e commit 584a584
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pgx-pg-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,9 @@ fn build_shim_for_version(
.unwrap();
}

let make = option_env!("MAKE").unwrap_or("make").to_string();
let rc = run_command(
Command::new("make")
Command::new(make)
.arg("clean")
.arg(&format!("libpgx-cshim-{}.a", major_version))
.env("PG_TARGET_VERSION", format!("{}", major_version))
Expand Down
2 changes: 1 addition & 1 deletion pgx-pg-sys/src/submodules/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extern "C" {
) -> std::os::raw::c_int;
}

#[cfg(any(target_os = "macos", target_os = "freebsd"))]
#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "openbsd"))]
extern "C" {
pub(crate) fn sigsetjmp(
env: *mut crate::sigjmp_buf,
Expand Down

0 comments on commit 584a584

Please sign in to comment.