function wait() is declared in another function. Is it legal?

```
void panic(const int reason, const char *strg) 
{
int ErrNo;
struct machine_attributes mach;
int ret, docstat, cnt;
pid_t pid, wait(int *), setsid(void); 
    ......
}

```

Thank you!