The addition of the NBD block_size callback to 2.1.3 prevents it from building against nbdkit libraries older than 1.30.0 (when that callback was added). Among other distributions, this blocks building on ubuntu focal and jammy, both of which are LTS and remain under support. (Relatively easy workaround is to remove the block_size callback change before building; harder workaround is to ugprade the nbdkit libraries to get it to build.)
Depending on the desired target audience, might be worthwhile to ifdef the blocksize callbacks based on nbdkit
version number, The nbdkit headers provide version number macros:
The addition of the NBD block_size callback to 2.1.3 prevents it from building against nbdkit libraries older than 1.30.0 (when that callback was added). Among other distributions, this blocks building on ubuntu focal and jammy, both of which are LTS and remain under support. (Relatively easy workaround is to remove the block_size callback change before building; harder workaround is to ugprade the nbdkit libraries to get it to build.)
Depending on the desired target audience, might be worthwhile to ifdef the blocksize callbacks based on nbdkit version number, The nbdkit headers provide version number macros:
On mine, I added (in nbdkit.c):
and then wrapped the block_size callback structure initialization and callback function with:
#ifdef NDBKIT_BLOCKSIZE