Skip to content

Commit

Permalink
zstream: remove duplicate highbit64 definition
Browse files Browse the repository at this point in the history
When building a static build (--disable-shared), zstream fails to link
because of the duplicate highbit64() in libzpool/kernel.c. Since they're
identical, and the libzpool one is visible to zstream, we remove
zstream's copy and just use the common one.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes openzfs#16426
  • Loading branch information
robn authored and lundman committed Sep 4, 2024
1 parent 371c5db commit 0dbf6e0
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions cmd/zstream/zstream_redup.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,6 @@ typedef struct redup_table {
int numhashbits;
} redup_table_t;

#ifndef _WIN32
int
highbit64(uint64_t i)
{
if (i == 0)
return (0);

return (NBBY * sizeof (uint64_t) - __builtin_clzll(i));
}
#endif

void *
safe_calloc(size_t n)
{
Expand Down

0 comments on commit 0dbf6e0

Please sign in to comment.