define pg_dlsym() as returning a PGFunction pointer, not just any
pointer-to-function. But many are not. Suppress compiler warnings
on platforms that aren't careful by inserting explicit casts at the
two call sites that didn't have a cast already. Per Stefan.
*filehandle = lib_handle;
/* Look up the function within the library */
- retval = pg_dlsym(lib_handle, funcname);
+ retval = (PGFunction) pg_dlsym(lib_handle, funcname);
if (retval == NULL && signalNotFound)
ereport(ERROR,
PGFunction
lookup_external_function(void *filehandle, char *funcname)
{
- return pg_dlsym(filehandle, funcname);
+ return (PGFunction) pg_dlsym(filehandle, funcname);
}