diff --git a/crypto/.cvsignore b/crypto/.cvsignore
index 1cf6edd3bc..27b00b29d1 100644
--- a/crypto/.cvsignore
+++ b/crypto/.cvsignore
@@ -4,3 +4,4 @@ opensslconf.h
 Makefile.save
 *.flc
 semantic.cache
+x86cpuid-elf.s
diff --git a/crypto/asn1/a_type.c b/crypto/asn1/a_type.c
index c603741f39..6a1e5a7a5a 100644
--- a/crypto/asn1/a_type.c
+++ b/crypto/asn1/a_type.c
@@ -59,6 +59,7 @@
 #include <stdio.h>
 #include "cryptlib.h"
 #include <openssl/asn1t.h>
+#include <openssl/objects.h>
 
 int ASN1_TYPE_get(ASN1_TYPE *a)
 	{
diff --git a/crypto/ts/ts_rsp_sign.c b/crypto/ts/ts_rsp_sign.c
index aa81f74558..ea4506a9ee 100644
--- a/crypto/ts/ts_rsp_sign.c
+++ b/crypto/ts/ts_rsp_sign.c
@@ -278,7 +278,7 @@ int TS_RESP_CTX_add_md(TS_RESP_CTX *ctx, const EVP_MD *md)
 	if (!ctx->mds && !(ctx->mds = sk_EVP_MD_new_null())) 
 		goto err;
 	/* Add the shared md, no copy needed. */
-	if (!sk_EVP_MD_push(ctx->mds, md)) goto err;
+	if (!sk_EVP_MD_push(ctx->mds, (EVP_MD *)md)) goto err;
 
 	return 1;
  err: