]> git.proxmox.com Git - mirror_zfs.git/commitdiff
zstream: remove duplicate highbit64 definition
authorRob Norris <rob.norris@klarasystems.com>
Fri, 9 Aug 2024 21:31:41 +0000 (07:31 +1000)
committerGitHub <noreply@github.com>
Fri, 9 Aug 2024 21:31:41 +0000 (14:31 -0700)
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 #16426

cmd/zstream/zstream_redup.c

index 6866639fe465903d3c4859208889bf96498e7740..dccd325d4cfa1baf6899c7d5bd279e82fccfae52 100644 (file)
@@ -56,15 +56,6 @@ typedef struct redup_table {
        int             numhashbits;
 } redup_table_t;
 
-int
-highbit64(uint64_t i)
-{
-       if (i == 0)
-               return (0);
-
-       return (NBBY * sizeof (uint64_t) - __builtin_clzll(i));
-}
-
 void *
 safe_calloc(size_t n)
 {