diff options
| author | Jonathan Reem <[email protected]> | 2014-10-04 18:18:02 -0700 |
|---|---|---|
| committer | Jonathan Reem <[email protected]> | 2014-10-04 18:18:02 -0700 |
| commit | c22b3c5063da942954b0b71b03317bf2da058c7e (patch) | |
| tree | 9c0399824b008846677b022a1b88b5a1df85bc40 /native | |
| parent | Merge pull request #61 from alexcrichton/memcmp (diff) | |
| download | rust-openssl-c22b3c5063da942954b0b71b03317bf2da058c7e.tar.xz rust-openssl-c22b3c5063da942954b0b71b03317bf2da058c7e.zip | |
Add a dummy bn_is_zero C dependency to wrap BN_is_zero
This is necessary because on some architectures BN_is_zero
is a CPP macro, so trying to link against it in an `extern "C"`
block causes a linker error.
This also introduces a build command to Cargo to compile
the bn_is_zero wrapper.
Diffstat (limited to 'native')
| -rw-r--r-- | native/bn_is_zero.c | 4 | ||||
| -rw-r--r-- | native/bn_is_zero.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/native/bn_is_zero.c b/native/bn_is_zero.c new file mode 100644 index 00000000..b0a4300b --- /dev/null +++ b/native/bn_is_zero.c @@ -0,0 +1,4 @@ +#include <openssl/bn.h> + +int bn_is_zero(BIGNUM *x) { return BN_is_zero(x); } + diff --git a/native/bn_is_zero.h b/native/bn_is_zero.h new file mode 100644 index 00000000..8ec36c35 --- /dev/null +++ b/native/bn_is_zero.h @@ -0,0 +1 @@ +int bn_is_zero(BIGNUM *x); |