- Notifications
You must be signed in to change notification settings - Fork5.2k
Commite4d5854
committed
Fix build breakage on Solaris-alikes with late-model GCC.
Solaris has never bothered to add "const" to the second argumentof PAM conversation procs, as all other Unixen did decades ago.This resulted in an "incompatible pointer" compiler warning whenbuilding --with-pam, but had no more serious effect than that,so we never did anything about it. However, as of GCC 14 thecase is an error not warning by default.To complicate matters, recent OpenIndiana (and maybe illumosin general?) *does* supply the "const" by default, so we can'tjust assume that platforms using our solaris template need help.What we can do, short of building a configure-time probe,is to make solaris.h #define _PAM_LEGACY_NONCONST, whichcauses OpenIndiana's pam_appl.h to revert to the traditionaldefinition, and hopefully will have no effect anywhere else.Then we can use that same symbol to control whether we include"const" in the declaration of pam_passwd_conv_proc().Bug: #18995Reported-by: Andrew Watkins <awatkins1966@gmail.com>Author: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/18995-82058da9ab4337a7@postgresql.orgBackpatch-through: 131 parent313d310 commite4d5854
2 files changed
+19
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
98 | 105 | | |
99 | | - | |
| 106 | + | |
| 107 | + | |
100 | 108 | | |
101 | 109 | | |
102 | 110 | | |
| |||
1910 | 1918 | | |
1911 | 1919 | | |
1912 | 1920 | | |
1913 | | - | |
| 1921 | + | |
1914 | 1922 | | |
1915 | 1923 | | |
1916 | 1924 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments
Comments
(0)