diff -wpruN '--exclude=*.orig' a~/mysql_fdw.c a/mysql_fdw.c --- a~/mysql_fdw.c 1970-01-01 00:00:00 +++ a/mysql_fdw.c 1970-01-01 00:00:00 @@ -355,7 +355,7 @@ static List *getUpdateTargetAttrs(RangeT bool mysql_load_library(void) { -#if defined(__APPLE__) || defined(__FreeBSD__) +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun) /* * Mac OS/BSD does not support RTLD_DEEPBIND, but it still works without * the RTLD_DEEPBIND