Did you make a copy of the source and compile it using gcc for running on linux?
Try compiling it with the -Wall and -pedantic options and see if you get any warnings.
Here is a detailed article by IBM on debugging techniques in Linux:
http://www-106.ibm.com/developerwork.../?dwzone=linux
I hope it helps.
There is a book titled 'Linux Programming by Example' which may be worth your while picking up. It contains detailed information on topics like memory allocation. Such as making sure you have a valid pointer after using realloc().
There were some mentions of differences between some gnu routines and the unix equivalents.
Another book,
Advanced Programming in the Unix(R) Environment starts out with detailing the SUS compliance of Unix and Linux versions, and how to determine certain standard values at compile and run time.
You probably should of posted this message in the 'programming' forum instead. The moderator may actually move it there.