Update comm.c

Make comm.c compatible with OSX