`#include <limits.h>` and check for `iovcnt > IOV_MAX`? There's not much point in using sysconf() here, IOV_MAX is not configurable on systems we support.