I haven't tried the above problem, but with many pd programs I get from the net specifically set up for BSD, I'm able to get 'em running on our 4D's by adding -I/usr/include/bsd and -lbsd -lsun during compilation. Give it a whirl, it may work.