Declare script as sh, not csh.

It uses "read" which is a sh command.
Use void* instead of caddr_t.

caddr_t is an old BSD-ism no longer used.
Define _GNU_SOURCE on Linux to get MAP_ANONYMOUS.