Added signal.h to packet.c , fixed compile errors