Ahh, after some searching, I think that I have an idea what the problem is: apologies for not realising this sooner. For some reason, when I first tried to compile this, Dr. Supergood's suggestion/patch did not work: I still got the timespec error. I ended up modifying pthread.h, which I have just realised is not actually staged, so this would not have been downloaded. I had to add the following to somewhere (anywhere) near the top of the file):
Given that this file is not staged, this is a very unsatisfactory way of doing things, but I am not sure why it is necessary. I wonder whether Dr. Supergood has any ideas?
Edit: I think that I have fixed this based on Dr. Supergood's advice above, by referring to simthread.h rather than pthread.h. I should be grateful if people could let me know whether this works.