Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont compile with mosquitto 1.6.3 #20

Open
DxrMorgan opened this issue Jun 23, 2019 · 2 comments
Open

Dont compile with mosquitto 1.6.3 #20

DxrMorgan opened this issue Jun 23, 2019 · 2 comments

Comments

@DxrMorgan
Copy link

make:

cc -std=gnu99 -fPIC -I../lib -I../src python3.6-config --includes -Wall -Wextra -O2 -I.//src/ -I.//lib/ -c -o auth_plugin_pyauth.o auth_plugin_pyauth.c
auth_plugin_pyauth.c:303:5: error: conflicting types for ‘mosquitto_auth_acl_check’
int mosquitto_auth_acl_check(void *user_data, int access, const struct mosquitto *client, const struct mosquitto_acl_msg *msg)
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from auth_plugin_pyauth.c:8:0:
/usr/local/include/mosquitto_plugin.h:237:5: note: previous declaration of ‘mosquitto_auth_acl_check’ was here
int mosquitto_auth_acl_check(void *user_data, int access, struct mosquitto *client, const struct mosquitto_acl_msg *msg);
^~~~~~~~~~~~~~~~~~~~~~~~
auth_plugin_pyauth.c:330:5: error: conflicting types for ‘mosquitto_auth_unpwd_check’
int mosquitto_auth_unpwd_check(void *user_data, const struct mosquitto *client unused, const char *username, const char *password)
^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from auth_plugin_pyauth.c:8:0:
/usr/local/include/mosquitto_plugin.h:254:5: note: previous declaration of ‘mosquitto_auth_unpwd_check’ was here
int mosquitto_auth_unpwd_check(void *user_data, struct mosquitto *client, const char *username, const char *password);
^~~~~~~~~~~~~~~~~~~~~~~~~~
auth_plugin_pyauth.c:354:5: error: conflicting types for ‘mosquitto_auth_psk_key_get’
int mosquitto_auth_psk_key_get(void *user_data,
^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from auth_plugin_pyauth.c:8:0:
/usr/local/include/mosquitto_plugin.h:282:5: note: previous declaration of ‘mosquitto_auth_psk_key_get’ was here
int mosquitto_auth_psk_key_get(void *user_data, struct mosquitto *client, const char *hint, const char *identity, char *key, int max_key_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~
Makefile:26: recipe for target 'auth_plugin_pyauth.o' failed
make: *** [auth_plugin_pyauth.o] Error 1

@amimoto
Copy link

amimoto commented Feb 10, 2020

I was able to make things compile by modifying auth_plugin_pyauth.c. At least on my test system which was an Ubuntu 18.04 system the following small changes allowed it to compile:

amimoto@7802491

Not sure why the const was dropped but I just wanted to test the code out. Perhaps this will help someone else out.

@dg239371
Copy link

dg239371 commented Mar 8, 2022

The attached patch auth_mqtt.txt has allowed me to compile and use the pyauth with mosquitto 2.014 on Ubuntu 20.04 and python3.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants