Apparently not, my two suggestions are:
char dirpath[80] = "/path/to/some/directory";
sprintf(mkcmd, "mkdir -p %s", dirpath);
system(mkcmd);
Or if you don't want to use system()
try looking at the coreutils mkdir
source code and see how they implemented the -p
option.