mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Add fallback implementation for setenv()
This fixes the code compilation on Windows with MSVC and Kerberos, as a missing implementation of setenv() causes a compilation failure of the GSSAPI code. This was only reproducible when building the code with Kerberos, something that buildfarm animal hamerkop has fixed recently. This issue only happens on 12 and 13, as this code has been introduced inb0b39f7
. HEAD is already able to compile properly thanks to7ca37fb0
, and this commit is a minimal cherry-pick of it. Thanks to Tom Lane for the discussion. Discussion: https://postgr.es/m/YLDtm5WGjPxm6ua4@paquier.xyz Backpatch-through: 12
This commit is contained in:
@ -1788,12 +1788,14 @@ case $host_os in
|
||||
# and doesn't need a replacement getpeereid because it doesn't use
|
||||
# Unix sockets.
|
||||
mingw*)
|
||||
AC_DEFINE(HAVE_SETENV, 1, [Define to 1 because replacement version used.])
|
||||
AC_DEFINE(HAVE_UNSETENV, 1, [Define to 1 because replacement version used.])
|
||||
AC_DEFINE(HAVE_GETPEEREID, 1, [Define to 1 because function not required.])
|
||||
ac_cv_func_setenv=yes
|
||||
ac_cv_func_unsetenv=yes
|
||||
ac_cv_func_getpeereid=yes;;
|
||||
*)
|
||||
AC_REPLACE_FUNCS([unsetenv getpeereid])
|
||||
AC_REPLACE_FUNCS([setenv unsetenv getpeereid])
|
||||
;;
|
||||
esac
|
||||
|
||||
|
Reference in New Issue
Block a user