From dd58a398de49b442ed923cbeb5216b6d863c09b5 Mon Sep 17 00:00:00 2001 From: John Hood Date: Sun, 7 Jun 2015 15:42:24 -0400 Subject: [PATCH] ocb.cc: Mark local functions as static This fixes the broken i386 build (aka generic code). Untested on __ALTIVEC__ and __ARM_NEON__. Signed-off-by: John Hood --- src/crypto/ocb.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/crypto/ocb.cc b/src/crypto/ocb.cc index 083dcf5..161752c 100644 --- a/src/crypto/ocb.cc +++ b/src/crypto/ocb.cc @@ -193,7 +193,7 @@ #define unequal_blocks(x,y) vec_any_ne(x,y) #define swap_if_le(b) (b) #if __PPC64__ - block gen_offset(uint64_t KtopStr[3], unsigned bot) { + static block gen_offset(uint64_t KtopStr[3], unsigned bot) { union {uint64_t u64[2]; block bl;} rval; rval.u64[0] = (KtopStr[0] << bot) | (KtopStr[1] >> (64-bot)); rval.u64[1] = (KtopStr[1] << bot) | (KtopStr[2] >> (64-bot)); @@ -201,7 +201,7 @@ } #else /* Special handling: Shifts are mod 32, and no 64-bit types */ - block gen_offset(uint64_t KtopStr[3], unsigned bot) { + static block gen_offset(uint64_t KtopStr[3], unsigned bot) { const vector unsigned k32 = {32,32,32,32}; vector unsigned hi = *(vector unsigned *)(KtopStr+0); vector unsigned lo = *(vector unsigned *)(KtopStr+2); @@ -246,7 +246,7 @@ } #define swap_if_le(b) (b) /* Using endian-neutral int8x16_t */ /* KtopStr is reg correct by 64 bits, return mem correct */ - block gen_offset(uint64_t KtopStr[3], unsigned bot) { + static block gen_offset(uint64_t KtopStr[3], unsigned bot) { const union { unsigned x; unsigned char endian; } little = { 1 }; const int64x2_t k64 = {-64,-64}; uint64x2_t hi = *(uint64x2_t *)(KtopStr+0); /* hi = A B */ @@ -286,7 +286,7 @@ } /* KtopStr is reg correct by 64 bits, return mem correct */ - block gen_offset(uint64_t KtopStr[3], unsigned bot) { + static block gen_offset(uint64_t KtopStr[3], unsigned bot) { block rval; if (bot != 0) { rval.l = (KtopStr[0] << bot) | (KtopStr[1] >> (64-bot)); @@ -1271,7 +1271,7 @@ static void vectors(ae_ctx *ctx, int len) printf("P=%d,A=%d: ",len,0); pbuf(ct, i, NULL); } -void validate() +static void validate() { ALIGN(16) uint8_t pt[1024]; ALIGN(16) uint8_t ct[1024];