From aeee69046d580333564ffc9046a9b61d2db8d53d Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Fri, 22 Oct 2021 09:41:24 +1000 Subject: cifs.upcall: fix compiler warning Signed-off-by: Ronnie Sahlberg --- cifs.upcall.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cifs.upcall.c b/cifs.upcall.c index e9c7f5f..5e7c0a1 100644 --- a/cifs.upcall.c +++ b/cifs.upcall.c @@ -69,6 +69,10 @@ #include #endif +#ifndef discard_const +#define discard_const(ptr) ((void *)((intptr_t)(ptr))) +#endif + static krb5_context context; static const char *prog = "cifs.upcall"; @@ -805,7 +809,7 @@ cifs_gss_get_req(const char *host, DATA_BLOB *mechtoken, DATA_BLOB *sess_key) GSS_C_NO_CREDENTIAL, /* claimant_cred_handle */ &ctx, target_name, - gss_mech_krb5, /* force krb5 */ + discard_const(gss_mech_krb5), /* force krb5 */ 0, /* flags */ 0, /* time_req */ GSS_C_NO_CHANNEL_BINDINGS, /* input_chan_bindings */ -- cgit v1.2.3