Closed ZhenbangYou closed 5 months ago
Huh, how odd is that. Might be better to update the documentation, as the compile time check is identical to this one. If we just flip them that has a higher risk of breaking.
Actually it looks worse than that as this is what I get:
major=2, minor=6
2.0 0
2.5 0
2.6 1
2.7 1
3.0 1
Pushed a fix, at least now it's consistent. Would be nice to swap them, but seems like a bad idea at this point.
Thank you, Jens! Yeah it's a little strange that it returns false when version matches, but it's a safer way.
A typo in the commit message of this commit: "If the majors are the same, only if the major is larger should we return true." The latter "major" should be "minor".
Oh well, nothing I can do about that now. But yeah, you are totally right.
The man page says, "The io_uring_check_version(3) function returns true if the liburing library loaded by the dynamic linker is greater-than or equal-to the major and minor numbers provided." However, according to the implementation (also shown below), it's NOT greater-than or equal-to, but less-than or equal-to.
For example, I'm using liburing 2.6, and
io_uring_check_version(2, 4)
returnsfalse
. The same issue applies toIO_URING_CHECK_VERSION
.