In classic C you cannot return a struct. New C/C++ versions can but believe me you normally dont want to do it. Return a struct pointer instead.

HIT* compute_paths(vars x) {
static HIT hit;
...
return &hit;
}