mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>, ukl@pengutronix.de
Subject: Re: [PATCH] scripts: mxsimage: Fix build with OpenSSL < 1.1.x
Date: Wed, 22 Feb 2017 09:46:43 +0100	[thread overview]
Message-ID: <20170222084643.pbxtgbnfbepeabkn@pengutronix.de> (raw)
In-Reply-To: <1487598249.2268.9.camel@pengutronix.de>

On Mon, Feb 20, 2017 at 02:44:09PM +0100, Lucas Stach wrote:
> Am Dienstag, den 31.01.2017, 15:29 +0100 schrieb Sascha Hauer:
> > Move the compatibility wrapper functions up so that they
> > are defined before they are used.
> > 
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> 
> Tested-by: Lucas Stach <l.stach@pengutronix.de>
> 
> This fixes the build failures seen in the randcfg builder. Can you
> please commit this?

Already did that.

Sascha

> 
> > ---
> >  scripts/mxsimage.c | 62 +++++++++++++++++++++++++++---------------------------
> >  1 file changed, 31 insertions(+), 31 deletions(-)
> > 
> > diff --git a/scripts/mxsimage.c b/scripts/mxsimage.c
> > index bcbbf00..5c2c307 100644
> > --- a/scripts/mxsimage.c
> > +++ b/scripts/mxsimage.c
> > @@ -410,6 +410,37 @@ static void make_crc_table(void)
> >  	crc_table_valid = 1;
> >  }
> >  
> > +/*
> > + * OpenSSL 1.1.0 and newer compatibility functions:
> > + * https://wiki.openssl.org/index.php/1.1_API_Changes
> > + */
> > +#if OPENSSL_VERSION_NUMBER < 0x10100000L
> > +static void *OPENSSL_zalloc(size_t num)
> > +{
> > +	void *ret = OPENSSL_malloc(num);
> > +
> > +	if (ret != NULL)
> > +		memset(ret, 0, num);
> > +	return ret;
> > +}
> > +
> > +EVP_MD_CTX *EVP_MD_CTX_new(void)
> > +{
> > +	return OPENSSL_zalloc(sizeof(EVP_MD_CTX));
> > +}
> > +
> > +void EVP_MD_CTX_free(EVP_MD_CTX *ctx)
> > +{
> > +	EVP_MD_CTX_cleanup(ctx);
> > +	OPENSSL_free(ctx);
> > +}
> > +
> > +int EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx)
> > +{
> > +	return EVP_CIPHER_CTX_cleanup(ctx);
> > +}
> > +#endif
> > +
> >  uint32_t pbl_crc32(uint32_t in_crc, const char *buf, uint32_t len)
> >  {
> >  	uint32_t crc32_val;
> > @@ -2292,37 +2323,6 @@ static int sb_verify_image_end(struct sb_image_ctx *ictx,
> >  	return ret;
> >  }
> >  
> > -/*
> > - * OpenSSL 1.1.0 and newer compatibility functions:
> > - * https://wiki.openssl.org/index.php/1.1_API_Changes
> > - */
> > -#if OPENSSL_VERSION_NUMBER < 0x10100000L
> > -static void *OPENSSL_zalloc(size_t num)
> > -{
> > -	void *ret = OPENSSL_malloc(num);
> > -
> > -	if (ret != NULL)
> > -		memset(ret, 0, num);
> > -	return ret;
> > -}
> > -
> > -EVP_MD_CTX *EVP_MD_CTX_new(void)
> > -{
> > -	return OPENSSL_zalloc(sizeof(EVP_MD_CTX));
> > -}
> > -
> > -void EVP_MD_CTX_free(EVP_MD_CTX *ctx)
> > -{
> > -	EVP_MD_CTX_cleanup(ctx);
> > -	OPENSSL_free(ctx);
> > -}
> > -
> > -int EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx)
> > -{
> > -	return EVP_CIPHER_CTX_cleanup(ctx);
> > -}
> > -#endif
> > -
> >  static int sb_build_tree_from_img(struct sb_image_ctx *ictx)
> >  {
> >  	long filesize;
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2017-02-22  8:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31 14:29 Sascha Hauer
2017-02-20 13:44 ` Lucas Stach
2017-02-22  8:46   ` Sascha Hauer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-01-09 12:42 [PATCH] scripts: mxsimage: Fix build with OpenSSL 1.1.x Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170222084643.pbxtgbnfbepeabkn@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=l.stach@pengutronix.de \
    --cc=ukl@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox