I don't have enough reputation to be able to add a comment, but using the answer from Andrew Hart I was able to resolve this. For completeness of this thread in case the linked solution ever disappears:
Locate these sections from the app_httpd.cpp:
detected = true;
face_id = run_face_recognition(...
When you tried:
netcfg *cfg = (netcfg) buffer;
The problem here doesn't have to do with pointers. The problem here is that you can't cast non-scalar types (as buffer). If you instead tried:
netcfg cfg = (netcfg) buffer;
It wouldn't work either. The problem has to do with casting a non-scalar value such as an array of char in your case.
Scalar values: int, ...