Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Partial update from FFS upstream #3873

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion thirdparty/ffs/ffs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ else()
endif()

set(FM_SRC_LIST
fm_formats.c fm_dump.c lookup3.c string_conversion.c fm_get.c xml.c
fm_formats.c fm_dump.c siphash.c string_conversion.c fm_get.c xml.c
${FM_SOCKET_IO})
foreach(FM_SRC ${FM_SRC_LIST})
list(APPEND FM_MASTER_SRC_LIST fm/${FM_SRC})
Expand Down
18 changes: 13 additions & 5 deletions thirdparty/ffs/ffs/fm/fm_formats.c
Original file line number Diff line number Diff line change
Expand Up @@ -1973,12 +1973,20 @@ register_data_format(FMContext context, FMStructDescList struct_list)

INT4 FFS_self_server_IP_addr = 0;

extern void hashlittle2(
const void *key, /* the key to hash */
size_t length, /* length of the key */
INT4 *pc, /* IN: primary initval, OUT: primary hash */
INT4 *pb) /* IN: secondary initval, OUT: secondary hash */;
#include "siphash.h"

static void hashlittle2(
const void *data, /* the data to hash */
size_t length, /* length of the data */
INT4 *pc, /* IN: primary initval, OUT: primary hash */
INT4 *pb)
{
static const uint64_t skey[2] = {0xECB8FF2F434B2FBB, 0xB4E298A99A71F723 };
INT4 output[2];
siphash(data, length, &skey, (uint8_t*) &output[0], sizeof(output));
*pc = output[0];
*pb = output[1];
}

extern void
generate_format3_server_ID(server_ID_type *server_ID,
Expand Down
Loading
Loading