No answers + deadline to meet = write it myself.
For future reference, it was only a few lines of code, using libparted. For readability, I've omitted error checking, etc. Caller is responsible for ensuring there's enough space in the partition for the new filesystem size.
#include <parted/parted.h>
int
resize_filesystem(const char *device, PedSector newsize)
{
PedDevice *dev = NULL;
PedGeometry *geom = NULL;
PedGeometry *new_geom = NULL;
PedFileSystem *fs = NULL;
int rc = 0;
dev = ped_device_get(device);
ped_device_open(dev);
geom = ped_geometry_new(dev, 0LL, dev->length);
fs = ped_file_system_open(geom);
new_geom = ped_geometry_new(dev, 0LL, newsize / dev->sector_size);
ped_file_system_resize(fs, new_geom, NULL);
ped_file_system_close(fs);
ped_geometry_destroy(geom);
ped_geometry_destroy(new_geom);
ped_device_close(dev);
return rc;
}