It compiles fine now !!!add
#include <netinet/in.h>
#include <netinet/in_pcb.h>
before
#include <netinet/tcp_var.h>
The bug has been successfully resolved.the bug report can stay, its still a bug
if it works ( i have no idea what it does) post a patch to the bug reports