krb5-1.19.2 fails compilation in src/tests/gssapi/common.c with HP aCC on HP-UX

"Osipov, Michael (LDA IT PLM)" <[email protected]>
Newsgroups gmane.comp.encryption.kerberos.general
Message-ID <[email protected]>
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           [email protected]
https://mailman.mit.edu/mailman/listinfo/kerberos
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.