Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #4487 from ethcore/snappy-static
Browse files Browse the repository at this point in the history
Static link for snappy
  • Loading branch information
rphmeier authored Feb 8, 2017
2 parents 8773889 + cdc09a6 commit 656c089
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/src/snappy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const SNAPPY_OK: c_int = 0;
const SNAPPY_INVALID_INPUT: c_int = 1;
const SNAPPY_BUFFER_TOO_SMALL: c_int = 2;

#[link(name = "snappy")]
#[link(name = "snappy", kind = "static")]
extern {
fn snappy_compress(
input: *const c_char,
Expand Down Expand Up @@ -154,4 +154,4 @@ pub fn decompress_into(input: &[u8], output: &mut Vec<u8>) -> Result<usize, Inva
pub fn validate_compressed_buffer(input: &[u8]) -> bool {
let status = unsafe { snappy_validate_compressed_buffer(input.as_ptr() as *const c_char, input.len() as size_t )};
status == SNAPPY_OK
}
}

0 comments on commit 656c089

Please sign in to comment.