rewrite hub.c for Linux merging errors
Signed-off-by: Jean Francis Dominique S. Mabalot <jfdsmabalot@redhat.com>