[38969] in Kerberos
krb5-1.19.2 fails compilation in src/tests/gssapi/common.c with HP
daemon@ATHENA.MIT.EDU (Osipov, Michael (LDA IT PLM))
Wed Aug 18 12:02:34 2021
To: <kerberos@mit.edu>
From: "Osipov, Michael (LDA IT PLM)" <michael.osipov@siemens.com>
Message-ID: <8fe2687d-a99e-905e-b064-8bf239edb9d6@siemens.com>
Date: Wed, 18 Aug 2021 12:17:23 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu
Folks,
my compiler tells me:
> /opt/aCC/bin/aCC -Ae -DHAVE_CONFIG_H -DUSE_AUTOCONF_H -I../../include -I../../include -I./../../lib/gssapi/mechglue -I./../../lib/gssapi/krb5 -I./../../lib/gssapi/generic -I../../lib/gssapi/krb5 -I../../lib/gssapi/generic -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE -I/opt/ports/include -g -D_REENTRANT -D_THREAD_SAFE -D_POSIX_C_SOURCE=199506L -c common.c
> "common.c", line 121: error #2118: a void function may not return a value
> return establish_contexts_ex(imech, icred, acred, tname, flags, ictx, actx,
> ^
>
> 1 error detected in the compilation of "common.c".
> gmake[2]: *** [Makefile:500: common.o] Error 2
> gmake[2]: Leaving directory '/var/tmp/ports/work/krb5-1.19.2/src/tests/gssapi'
> gmake[1]: *** [Makefile:1224: all-recurse] Error 1
> gmake[1]: Leaving directory '/var/tmp/ports/work/krb5-1.19.2/src/tests'
> gmake: *** [Makefile:1554: all-recurse] Error 1
The error is obvious, return value from a void function isn't possible.
Here is a patch which solved the issue for me:
> diff -ur src/tests/gssapi/common.c src/tests/gssapi/common.c
> --- src/tests/gssapi/common.c 2021-07-22 17:50:07 +0000
> +++ src/tests/gssapi/common.c 2021-08-17 17:46:16 +0000
> @@ -118,7 +118,7 @@
> gss_ctx_id_t *actx, gss_name_t *src_name, gss_OID *amech,
> gss_cred_id_t *deleg_cred)
> {
> - return establish_contexts_ex(imech, icred, acred, tname, flags, ictx, actx,
> + establish_contexts_ex(imech, icred, acred, tname, flags, ictx, actx,
> GSS_C_NO_CHANNEL_BINDINGS,
> GSS_C_NO_CHANNEL_BINDINGS, NULL, src_name,
> amech, deleg_cred);
Hope to see this addressed soon.
Michael
________________________________________________
Kerberos mailing list Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos