system/extra: include more of what you use.

This is a reland of aa24bc89b78a5981df7618bdef78b7b49ffad14d which was
reverted in 291e20dab39783c7074191ff2d2de9b86465c10f because it broke
the git_master-gpl builder.

This version of the change uses crypto.h as a proxy for mem.h because
it'll work in both BoringSSL and OpenSSL.

(cherry picked from commit a83adf6354f3073a1938ffcd6cadd5c357856de5)

Bug: 21085331
Change-Id: I9e4c9e4d459c2e31f74180b3a3b2ab139ab76e80
diff --git a/verity/generate_verity_key.c b/verity/generate_verity_key.c
index a55600c..0da978f 100644
--- a/verity/generate_verity_key.c
+++ b/verity/generate_verity_key.c
@@ -14,10 +14,13 @@
  * limitations under the License.
  */
 
+#define _GNU_SOURCE  /* needed for asprintf */
+
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
-#include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 /* HACK: we need the RSAPublicKey struct
diff --git a/verity/verify_boot_signature.c b/verity/verify_boot_signature.c
index 55591aa..58b7a19 100644
--- a/verity/verify_boot_signature.c
+++ b/verity/verify_boot_signature.c
@@ -19,6 +19,7 @@
 #include <endian.h>
 #include <stddef.h>
 #include <stdint.h>
+#include <stdlib.h>
 #include <string.h>
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -28,6 +29,7 @@
 
 #include <openssl/asn1.h>
 #include <openssl/asn1t.h>
+#include <openssl/crypto.h>
 #include <openssl/err.h>
 #include <openssl/evp.h>
 #include <openssl/rsa.h>