From the posting that started this thread:
The function is defined without an explicit return type, which means "implicit int" under C89 rules and "diagnostic required" under C99.
The existence of a (putatively) correct program at the other end of a link is not the issue: The problem is that the illustrative code shown in the manual is faulty. Here it is, again from the thread-originating post:
Note the unbalanced parentheses in the `if' statement and the four uses of `.' where `->' was intended. (It's a good thing I said "at least" three errors.)
I'm suggesting that you compile and test the actual code given in the manual. He who fails to follow the example of K&R risks becoming an example in the next edition of K&P.[*]
[*] Not Kernighan and Pike but Kernighan and Plauger "The Elements of Programming Style." Instances of faulty code are analyzed, not just for their faults but also for the underlying causes. The bad code comes from various published programming texts whose authors seem not to have insisted upon attribution ... A sobering must-read for any professional programmer.