diff options
-rw-r--r-- | src/lib/third_party/src/ahocorasick.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/third_party/src/ahocorasick.c b/src/lib/third_party/src/ahocorasick.c index ba526056f..39b08443b 100644 --- a/src/lib/third_party/src/ahocorasick.c +++ b/src/lib/third_party/src/ahocorasick.c @@ -849,7 +849,11 @@ xmemchr(char *s, char i,int n) mask = c * DUPC; while (n >= LBLOCKSIZE) { - unsigned long int nc = DETECTNULL((*(unsigned long int *)s) ^ mask); +#if __SIZEOF_LONG__ == 4 + unsigned long int nc = DETECTNULL(le32toh(*(unsigned long int *)s) ^ mask); +#else + unsigned long int nc = DETECTNULL(le64toh(*(unsigned long int *)s) ^ mask); +#endif if(nc) return s + (bsf(nc) >> 3); s += LBLOCKSIZE; |