Magnus Hagander <mag...@hagander.net> writes: > I think the defensive-in-code instead of defensive-in-docs is a really > strong argument, so I have pushed it as such.
I notice warnings that I think are caused by this patch on some buildfarm members, eg drongo | 2020-11-15 06:59:05 | C:\prog\bf\root\HEAD\pgsql.build\src\port\pg_strong_random.c(96,11): warning C4013: 'RAND_poll' undefined; assuming extern returning int [C:\prog\bf\root\HEAD\pgsql.build\postgres.vcxproj] drongo | 2020-11-15 06:59:05 | C:\prog\bf\root\HEAD\pgsql.build\src\port\pg_strong_random.c(96,11): warning C4013: 'RAND_poll' undefined; assuming extern returning int [C:\prog\bf\root\HEAD\pgsql.build\libpgport.vcxproj] drongo | 2020-11-15 06:59:05 | C:\prog\bf\root\HEAD\pgsql.build\src\port\pg_strong_random.c(96,11): warning C4013: 'RAND_poll' undefined; assuming extern returning int [C:\prog\bf\root\HEAD\pgsql.build\postgres.vcxproj] drongo | 2020-11-15 06:59:05 | C:\prog\bf\root\HEAD\pgsql.build\src\port\pg_strong_random.c(96,11): warning C4013: 'RAND_poll' undefined; assuming extern returning int [C:\prog\bf\root\HEAD\pgsql.build\libpgport.vcxproj] (bowerbird and hamerkop are showing the same). My first thought about it was that this bit is busted: +#ifndef USE_OPENSSL + RAND_poll(); +#endif The obvious problem with this is that if !USE_OPENSSL, we will not have pulled in openssl's headers. However ... all these machines are pointing at line 96, which is not that one but the one under "#if defined(USE_OPENSSL)". So I'm not sure what to make of that, except that a bit more finesse seems required. regards, tom lane