1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
samba-mirror/lib/krb5_wrap/wscript_configure
Joseph Sutton 7d3416e8cb krb5: Detect support for krb5_const_pac type
We can't unconditionally assume (as we did in
third_party/heimdal_build/wscript_configure) that Heimdal has this type,
since we may have an older system Heimdal that lacks it. We must also
check whether krb5_pac_get_buffer() is usable with krb5_const_pac, and
declare krb5_const_pac as a non-const typedef if not.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2022-11-08 02:39:37 +00:00

19 lines
884 B
Python

#!/usr/bin/env python
# Check whether we have the krb5_const_pac type, if we aren't sure already.
if conf.CONFIG_SET('HAVE_KRB5_CONST_PAC') or (
conf.CHECK_TYPE('krb5_const_pac',
headers='krb5.h',
lib='krb5')):
# If the type is available, check whether krb5_pac_get_buffer() accepts it
# as its second parameter, or whether it takes krb5_pac instead.
conf.CHECK_C_PROTOTYPE('krb5_pac_get_buffer',
'krb5_error_code krb5_pac_get_buffer('
' krb5_context context,'
' krb5_const_pac p,'
' uint32_t type,'
' krb5_data *data)',
define='KRB5_CONST_PAC_GET_BUFFER',
headers='krb5.h',
lib='krb5')