From 803fb345757447daba274b7398cf25384eb39867 Mon Sep 17 00:00:00 2001 From: Oystein Eftevaag Date: Wed, 1 Feb 2023 23:52:33 +0000 Subject: 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 --- Android.bp | 5 +++++ config.h | 2 ++ lib/crypto/crypto_scrypt-sse.c | 2 ++ 3 files changed, 9 insertions(+) diff --git a/Android.bp b/Android.bp index 1d784fc..ae10e23 100644 --- a/Android.bp +++ b/Android.bp @@ -53,6 +53,11 @@ cc_library_static { sdk_version: "17", host_supported: true, vendor_available: true, + target: { + windows: { + enabled: true, + }, + }, } cc_test { diff --git a/config.h b/config.h index 3514f39..c388856 100644 --- a/config.h +++ b/config.h @@ -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 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 +#ifndef _WIN32 #include +#endif #include #include -- cgit v1.2.3