[BACK]Return to patch-md5.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / mail / spamdyke / patches

File: [cvs.NetBSD.org] / pkgsrc / mail / spamdyke / patches / patch-md5.c (download)

Revision 1.2, Tue Dec 25 16:24:26 2018 UTC (2 years, 1 month ago) by schmonz
Branch: MAIN
CVS Tags: pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, HEAD
Changes since 1.1: +10 -1 lines

Sprinkle static on an inline. Fixes SmartOS and Ubuntu bulk builds (that
somehow don't have any -On in CFLAGS).

$NetBSD: patch-md5.c,v 1.2 2018/12/25 16:24:26 schmonz Exp $

Support PKGSRC_USE_SSP.

--- md5.c.orig	2015-04-30 00:53:36.000000000 +0000
+++ md5.c
@@ -128,7 +128,7 @@ unsigned char *htole(unsigned char *dest
  * Return value:
  *   X circular left-shifted n positions
  */
-inline uint32_t lshift(uint32_t X, int n)
+static inline uint32_t lshift(uint32_t X, int n)
   {
   return((n > 0) ? ((X << n) | (X >> (32 - n))) : X);
   }
@@ -165,7 +165,7 @@ unsigned char *md5(unsigned char destina
   if (pad_len <= 0)
     pad_len += 64;
 
-  memcpy(padding, PAD_BLOCK, pad_len);
+  memcpy(padding, (PAD_BLOCK), pad_len);
 
   /*
    * Step 2, RFC 1321, page 3.