]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: stick-table: fix build error on 32-bit platforms
authorWilly Tarreau <w@1wt.eu>
Sun, 21 Jan 2024 07:21:35 +0000 (08:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 21 Jan 2024 07:21:35 +0000 (08:21 +0100)
commitcdc993b19e0c405e99ff8852aa32601ec22d1157
tree3d38b8e0088e4d53b4241996d06809b48edba6d5
parent6e5aa1614557a2db4c11c7b640350bdaf8ffad65
BUILD: stick-table: fix build error on 32-bit platforms

Commit 9b2717e7b ("MINOR: stktable: use {show,set,clear} table with ptr")
stores a pointer in a long long (64bit), which fails the cas to void* on
32-bit platforms:

  src/stick_table.c: In function 'table_process_entry_per_ptr':
  src/stick_table.c:5136:37: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
   5136 |         ts = stktable_lookup_ptr(t, (void *)ptr);

On all our supported platforms, longs and pointers are of the same size,
so let's just turn this to a ulong instead.
src/stick_table.c