From 262abbb49f579073ff5288dca104a5c3dab486f2 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 12 Oct 2015 12:49:06 +0200 Subject: [PATCH] mpm: fix ac-ks compilation on cygwin --- src/util-mpm-ac-tile-small.c | 4 ++-- src/util-mpm-ac-tile.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util-mpm-ac-tile-small.c b/src/util-mpm-ac-tile-small.c index e271dc96db..d37d982e01 100644 --- a/src/util-mpm-ac-tile-small.c +++ b/src/util-mpm-ac-tile-small.c @@ -46,12 +46,12 @@ uint32_t FUNC_NAME(SCACTileSearchCtx *ctx, MpmThreadCtx *mpm_thread_ctx, int c = xlate[buf[0]]; /* If buflen at least 4 bytes and buf 4-byte aligned. */ if (buflen >= (4 + EXTRA) && ((uintptr_t)buf & 0x3) == 0) { - BTYPE data = *(BTYPE* restrict)(&buf[0]); + BUF_TYPE data = *(BUF_TYPE* restrict)(&buf[0]); uint64_t index = 0; /* Process 4*floor(buflen/4) bytes. */ i = 0; while ((i + EXTRA) < (buflen & ~0x3)) { - BTYPE data1 = *(BTYPE* restrict)(&buf[i + 4]); + BUF_TYPE data1 = *(BUF_TYPE* restrict)(&buf[i + 4]); index = SINDEX(index, state); state = SLOAD(state_table + index + c); c = xlate[BYTE1(data)]; diff --git a/src/util-mpm-ac-tile.c b/src/util-mpm-ac-tile.c index 025335d3ef..747a24fc88 100644 --- a/src/util-mpm-ac-tile.c +++ b/src/util-mpm-ac-tile.c @@ -1476,7 +1476,7 @@ void SCACTileDestroyCtx(MpmCtx *mpm_ctx) */ #define SCHECK(x) ((x) > 0) -#define BTYPE int32_t +#define BUF_TYPE int32_t // Extract byte N=0,1,2,3 from x #ifdef __tile__ #define BYTE0(x) __insn_bfextu(x, 0, 7)