mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-27 09:21:41 +02:00
29 lines
816 B
Diff
29 lines
816 B
Diff
--- ./src/hash.c.orig
|
|
+++ ./src/hash.c
|
|
@@ -26,6 +26,7 @@
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
+#include <stdint.h>
|
|
#include <hash.h>
|
|
#include <joedog/joedog.h>
|
|
#include <joedog/defs.h>
|
|
@@ -54,7 +55,7 @@
|
|
private BOOLEAN __lookup(HASH this, char *key);
|
|
private void __resize(HASH this);
|
|
private unsigned int __genkey(int size, char *str);
|
|
-private u_int32_t fnv_32_buf(void *buf, size_t len, u_int32_t hval);
|
|
+private uint32_t fnv_32_buf(void *buf, size_t len, uint32_t hval);
|
|
|
|
/**
|
|
* allocs size and space for the
|
|
@@ -265,7 +266,7 @@
|
|
* FNV-1a hash each octet in the buffer
|
|
*/
|
|
while (bp < be) {
|
|
- hval ^= (u_int32_t)*bp++;
|
|
+ hval ^= (uint32_t)*bp++;
|
|
hval += (hval<<1) + (hval<<4) + (hval<<7) + (hval<<8) + (hval<<24);
|
|
}
|
|
return hval;
|