Bug 277660 - www/mod_auth_kerb2: fix build with clang 17 when HEIMDAL is used
Summary: www/mod_auth_kerb2: fix build with clang 17 when HEIMDAL is used
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-apache (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-13 02:27 UTC by Jung-uk Kim
Modified: 2024-03-13 02:27 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (apache)


Attachments
Patches to fix build option HEIMDAL with Clang 17 (1.32 KB, patch)
2024-03-13 02:27 UTC, Jung-uk Kim
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jung-uk Kim freebsd_committer freebsd_triage 2024-03-13 02:27:57 UTC
Created attachment 249126 [details]
Patches to fix build option HEIMDAL with Clang 17

I've been using HEIMDAL option and it started failing from 13.3:

src/mod_auth_kerb.c:1405:20: error: incompatible function pointer types assigning to 'OM_uint32 (*)(OM_uint32 *, gss_ctx_id_t *, const gss_cred_id_t, const gss_buffer_t, const gss_channel_bindings_t, gss_name_t *, gss_OID *, gss_buffer_t, OM_uint32 *, OM_uint32 *, gss_cred_id_t *)' (aka 'unsigned int (*)(unsigned int *, struct gss_ctx_id_t_desc_struct **, struct gss_cred_id_t_desc_struct *const, struct gss_buffer_desc_struct *const, struct gss_channel_bindings_struct *const, struct gss_name_t_desc_struct **, struct gss_OID_desc_struct **, struct gss_buffer_desc_struct *, unsigned int *, unsigned int *, struct gss_cred_id_t_desc_struct **)') from 'OM_uint32 (OM_uint32 *, gss_ctx_id_t *, gss_const_cred_id_t, const gss_buffer_t, const gss_channel_bindings_t, gss_name_t *, gss_OID *, gss_buffer_t, OM_uint32 *, OM_uint32 *, gss_cred_id_t *)' (aka 'unsigned int (unsigned int *, struct gss_ctx_id_t_desc_struct **, const struct gss_cred_id_t_desc_struct *, struct gss_buffer_desc_struct *const, struct gss_channel_bindings_struct *const, struct gss_name_t_desc_struct **, struct gss_OID_desc_struct **, struct gss_buffer_desc_struct *, unsigned int *, unsigned int *, struct gss_cred_id_t_desc_struct **)') [-Wincompatible-function-pointer-types]
 1405 |   accept_sec_token = gss_accept_sec_context;
      |                    ^ ~~~~~~~~~~~~~~~~~~~~~~
src/mod_auth_kerb.c:1412:25: warning: comparison of distinct pointer types ('OM_uint32 (*)(OM_uint32 *, gss_ctx_id_t *, const gss_cred_id_t, const gss_buffer_t, const gss_channel_bindings_t, gss_name_t *, gss_OID *, gss_buffer_t, OM_uint32 *, OM_uint32 *, gss_cred_id_t *)' (aka 'unsigned int (*)(unsigned int *, struct gss_ctx_id_t_desc_struct **, struct gss_cred_id_t_desc_struct *const, struct gss_buffer_desc_struct *const, struct gss_channel_bindings_struct *const, struct gss_name_t_desc_struct **, struct gss_OID_desc_struct **, struct gss_buffer_desc_struct *, unsigned int *, unsigned int *, struct gss_cred_id_t_desc_struct **)') and 'OM_uint32 (*)(OM_uint32 *, gss_ctx_id_t *, gss_const_cred_id_t, const gss_buffer_t, const gss_channel_bindings_t, gss_name_t *, gss_OID *, gss_buffer_t, OM_uint32 *, OM_uint32 *, gss_cred_id_t *)' (aka 'unsigned int (*)(unsigned int *, struct gss_ctx_id_t_desc_struct **, const struct gss_cred_id_t_desc_struct *, struct gss_buffer_desc_struct *const, struct gss_channel_bindings_struct *const, struct gss_name_t_desc_struct **, struct gss_OID_desc_struct **, struct gss_buffer_desc_struct *, unsigned int *, unsigned int *, struct gss_cred_id_t_desc_struct **)')) [-Wcompare-distinct-pointer-types]
 1412 |              (accept_sec_token == gss_accept_sec_context)
      |               ~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~

The attached patch fixed the problem for me.