-
Notifications
You must be signed in to change notification settings - Fork 104
fix build with gcc 15 #249
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
Conversation
gcc 15 uses c23 as default
c11? I would have guessed c89... with maybe a line or two of c99 thrown in. :-) I'll get a few more recent versions of gcc set up to test and then get this in. (I seem to still have gcc 12 on most of my machines) Just curious. Can you cut-and-paste the errors that gcc 15 is giving? It's probably worth trying to get the Paho C lib updated for this. If nothing else, push the standard definition into the CMake files for that lib. |
Oh, and thanks for reporting this! |
@fpagliughi , The error is related to the fact that
|
Ok. There is already an issue on the Paho C repo about this: I do want to fix this in the C lib, but even if I put up a PR now, it could be a while before the next C release. So we can get this in to the Rust builder to keep us going. |
I tried by myself to compile using But I guess it's much better to support older compilers. Please take a look at this PR in the C library, it's 1 month old and hasn't received any comments |
@fpagliughi I tested compiling with
EDIT: |
Yeah, I think the proper solution is what the C library is targeting. At this point, the C library is going with C99, so we can use that. |
OK. I pushed the C version back to C99 to be keep with the version that the C library is claiming to track, then published a new -sys crate (v0.10.3) which should fix the latest version of this crate currently up on crates.io. I also sent a PR to the C lib to fix the upstream library: Thanks again! |
gcc 15 uses c23 as default. paho.mqtt.c is written with c11