Fix bool typedef slirp glue#513
Conversation
|
Did the issue appear to you with the |
|
Thanks for the fast reply! The problem only occurs with CMake, as it's not passing the --std=c99 flag to the compiler. The fix works fine for me, but the CMake workflow could definitely be improved if needed. |
|
I believe that's the right way to solve this issue, but my knowledge of cmake is not the best. |
|
Same for me. |
|
@OpenPosixDev: While passing the "-std=c99" flag might fix the problem in the short term, but take a deeper look at the slirp code base in open-simh. It's a very hacky adaptation from the QEMU code base from around 8 years ago. All of the types are fixed in place where a If you could, try the commit in PR #485 where some of your proposed fixes might already be addressed. Might not specifically address the slirp code base (been a couple of weeks since I looked at it.) Might be a better place to merge fixes. |
|
@bscottm FWIW, ZIMH now uses externally maintained SLiRP packages. It works very well and took very little work to accomplish. No point in vendoring code if you are just going to run it unchanged anyway. |
This PR fixes a bug in
slirp_glue/config-host.hwhere thebooltype was not correctly defined in environments using C versions prior to C23 (e.g., C99 or C11). Thetypedefforboolis only defined asintwhen the C version is lower than C23. Starting with C23,boolis automatically supported, so this typedef is only provided for older C versions.Changes:
boolasintfor C versions lower than C23.boolin C23 and later.Testing:
booltype is correctly defined.Additional Notes: