diff options
author | Oystein Eftevaag <oysteine@google.com> | 2023-02-01 23:52:33 +0000 |
---|---|---|
committer | Oystein Eftevaag <oysteine@google.com> | 2023-02-02 17:54:59 +0000 |
commit | 803fb345757447daba274b7398cf25384eb39867 (patch) | |
tree | dc6c42b0486a718499f44207bac0580ff6964c26 | |
parent | c3a5fc0e91d7b9cd3de426eef8d4ba17eac14eb7 (diff) | |
download | scrypt-803fb345757447daba274b7398cf25384eb39867.tar.gz |
Enable Windows host compilation of scrypt
Bug: 261908998
Test: scrypt builds using MinGW
IGNORE_COMPLIANCELINT=LicenseExists: Supporting new platform for existing package
Change-Id: Id4939e062750cf0491f110f09e91757495c6e347
-rw-r--r-- | Android.bp | 5 | ||||
-rw-r--r-- | config.h | 2 | ||||
-rw-r--r-- | lib/crypto/crypto_scrypt-sse.c | 2 |
3 files changed, 9 insertions, 0 deletions
@@ -53,6 +53,11 @@ cc_library_static { sdk_version: "17", host_supported: true, vendor_available: true, + target: { + windows: { + enabled: true, + }, + }, } cc_test { @@ -21,7 +21,9 @@ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `posix_memalign' function. */ +#ifndef _WIN32 #define HAVE_POSIX_MEMALIGN 1 +#endif /* Define to 1 if you have the <stdint.h> header file. */ #define HAVE_STDINT_H 1 diff --git a/lib/crypto/crypto_scrypt-sse.c b/lib/crypto/crypto_scrypt-sse.c index dd18f29..c50204d 100644 --- a/lib/crypto/crypto_scrypt-sse.c +++ b/lib/crypto/crypto_scrypt-sse.c @@ -29,7 +29,9 @@ #include "scrypt_platform.h" #include <sys/types.h> +#ifndef _WIN32 #include <sys/mman.h> +#endif #include <emmintrin.h> #include <errno.h> |