diff -ru mosquitto_pyauth-orig/auth_plugin_pyauth.c mosquitto_pyauth/auth_plugin_pyauth.c --- mosquitto_pyauth-orig/auth_plugin_pyauth.c 2022-03-07 22:54:24.061601718 +0000 +++ mosquitto_pyauth/auth_plugin_pyauth.c 2022-03-07 23:08:29.649730300 +0000 @@ -300,7 +300,7 @@ return MOSQ_ERR_SUCCESS; } -int mosquitto_auth_acl_check(void *user_data, int access, const struct mosquitto *client, const struct mosquitto_acl_msg *msg) +int mosquitto_auth_acl_check(void *user_data, int access, struct mosquitto *client, const struct mosquitto_acl_msg *msg) { struct pyauth_data *data = user_data; @@ -327,7 +327,7 @@ return ok ? MOSQ_ERR_SUCCESS : MOSQ_ERR_ACL_DENIED; } -int mosquitto_auth_unpwd_check(void *user_data, const struct mosquitto *client unused, const char *username, const char *password) +int mosquitto_auth_unpwd_check(void *user_data, struct mosquitto *client unused, const char *username, const char *password) { struct pyauth_data *data = user_data; @@ -352,7 +352,7 @@ } int mosquitto_auth_psk_key_get(void *user_data, - const struct mosquitto *client unused, + struct mosquitto *client unused, const char *hint, const char *identity, char *key, diff -ru mosquitto_pyauth-orig/Makefile mosquitto_pyauth/Makefile --- mosquitto_pyauth-orig/Makefile 2022-03-07 22:54:24.057601774 +0000 +++ mosquitto_pyauth/Makefile 2022-03-07 23:11:06.671525832 +0000 @@ -1,5 +1,5 @@ MOSQUITTO_SRC ?= ./ -PYTHON_VERSION ?= 3.6 +PYTHON_VERSION ?= 3 PYTHON_CONFIG = python$(PYTHON_VERSION)-config @@ -17,8 +17,8 @@ CFLAGS += -I$(MOSQUITTO_SRC)/src/ CFLAGS += -I$(MOSQUITTO_SRC)/lib/ -#LDFLAGS =-lmosquitto -LDFLAGS += -L$(MOSQUITTO_SRC)/lib/ +LDFLAGS =-lmosquitto `$(PYTHON_CONFIG) --embed --ldflags` +#LDFLAGS += -L$(MOSQUITTO_SRC)/lib/ all : auth_plugin_pyauth.so