Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> OK, add #include <stdio.h> to the file. That should fix it.
Seems unlikely, since libpq-fe.h already includes <stdio.h>.
The real problem here is that the code is wrong: it's passing NULL
to an int parameter.
regards, tom lane