Thread: pgsql: Try to fix breakage of sepgsql hooks by ENR patch.

pgsql: Try to fix breakage of sepgsql hooks by ENR patch.

From
Kevin Grittner
Date:
Try to fix breakage of sepgsql hooks by ENR patch.

Turned up by buildfarm animal rhinoceros.  Fixing blind.  Will have
to wait for next run by rhinoceros to know whether it worked.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/01fd6f8f2d15a9369768921d6fc95ac481779430

Modified Files
--------------
contrib/sepgsql/hooks.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)


Re: pgsql: Try to fix breakage of sepgsql hooks by ENRpatch.

From
Christoph Berg
Date:
Re: Kevin Grittner 2017-04-01 <E1cuBKg-0006RJ-RO@gemulon.postgresql.org>
> Try to fix breakage of sepgsql hooks by ENR patch.
>
> Turned up by buildfarm animal rhinoceros.  Fixing blind.  Will have
> to wait for next run by rhinoceros to know whether it worked.

Fwiw, I was seeing sepgsql problems on Ubuntu xenial and trusty this
morning (but not on Debian). Jenkins claims it was on 25dc142, so even
one commit before the ENR patch (which I think can be trusted, but
MMMV).

Anyway, it's fixed now with this commit. Thanks!


07:07:48 make[3]: Entering directory '/<<PKGBUILDDIR>>/build/contrib/sepgsql'
07:07:48 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute-Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2
-fstack-protector-strong-Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -fno-omit-frame-pointer
-fpic-I. -I/<<PKGBUILDDIR>>/build/../contrib/sepgsql -I../../src/include -I/<<PKGBUILDDIR>>/build/../src/include
-Wdate-time-D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.6  -c -o hooks.o
/<<PKGBUILDDIR>>/build/../contrib/sepgsql/hooks.c
07:07:48 /<<PKGBUILDDIR>>/build/../contrib/sepgsql/hooks.c: In function 'sepgsql_utility_command':
07:07:48 /<<PKGBUILDDIR>>/build/../contrib/sepgsql/hooks.c:368:12: warning: passing argument 5 of
'next_ProcessUtility_hook'from incompatible pointer type [-Wincompatible-pointer-types] 
07:07:48             dest, completionTag);
07:07:48             ^
07:07:48 /<<PKGBUILDDIR>>/build/../contrib/sepgsql/hooks.c:368:12: note: expected 'QueryEnvironment * {aka struct
QueryEnvironment*}' but argument is of type 'DestReceiver * {aka struct _DestReceiver *}' 
07:07:48 /<<PKGBUILDDIR>>/build/../contrib/sepgsql/hooks.c:368:18: warning: passing argument 6 of
'next_ProcessUtility_hook'from incompatible pointer type [-Wincompatible-pointer-types] 
07:07:48             dest, completionTag);
07:07:48                   ^
07:07:48 /<<PKGBUILDDIR>>/build/../contrib/sepgsql/hooks.c:368:18: note: expected 'DestReceiver * {aka struct
_DestReceiver*}' but argument is of type 'char *' 
07:07:48 /<<PKGBUILDDIR>>/build/../contrib/sepgsql/hooks.c:366:4: error: too few arguments to function
'next_ProcessUtility_hook'
07:07:48     (*next_ProcessUtility_hook) (pstmt, queryString,
07:07:48     ^
07:07:48 /<<PKGBUILDDIR>>/build/../contrib/sepgsql/hooks.c:372:10: warning: passing argument 5 of
'standard_ProcessUtility'from incompatible pointer type [-Wincompatible-pointer-types] 
07:07:48           dest, completionTag);
07:07:48           ^
07:07:48 In file included from /<<PKGBUILDDIR>>/build/../contrib/sepgsql/hooks.c:23:0:
07:07:48 /<<PKGBUILDDIR>>/build/../src/include/tcop/utility.h:38:13: note: expected 'QueryEnvironment * {aka struct
QueryEnvironment*}' but argument is of type 'DestReceiver * {aka struct _DestReceiver *}' 
07:07:48  extern void standard_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
07:07:48              ^
07:07:48 /<<PKGBUILDDIR>>/build/../contrib/sepgsql/hooks.c:372:16: warning: passing argument 6 of
'standard_ProcessUtility'from incompatible pointer type [-Wincompatible-pointer-types] 
07:07:48           dest, completionTag);
07:07:48                 ^
07:07:48 In file included from /<<PKGBUILDDIR>>/build/../contrib/sepgsql/hooks.c:23:0:
07:07:48 /<<PKGBUILDDIR>>/build/../src/include/tcop/utility.h:38:13: note: expected 'DestReceiver * {aka struct
_DestReceiver*}' but argument is of type 'char *' 
07:07:48  extern void standard_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
07:07:48              ^
07:07:48 /<<PKGBUILDDIR>>/build/../contrib/sepgsql/hooks.c:370:4: error: too few arguments to function
'standard_ProcessUtility'
07:07:48     standard_ProcessUtility(pstmt, queryString,
07:07:48     ^
07:07:48 In file included from /<<PKGBUILDDIR>>/build/../contrib/sepgsql/hooks.c:23:0:
07:07:48 /<<PKGBUILDDIR>>/build/../src/include/tcop/utility.h:38:13: note: declared here
07:07:48  extern void standard_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
07:07:48              ^
07:07:48 /<<PKGBUILDDIR>>/build/../contrib/sepgsql/hooks.c: In function '_PG_init':
07:07:48 /<<PKGBUILDDIR>>/build/../contrib/sepgsql/hooks.c:464:22: warning: assignment from incompatible pointer type
[-Wincompatible-pointer-types]
07:07:48   ProcessUtility_hook = sepgsql_utility_command;
07:07:48                       ^
07:07:48 <builtin>: recipe for target 'hooks.o' failed
07:07:48 make[3]: *** [hooks.o] Error 1


Christoph