-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ioq: Check for io_uring_register_iowq_max_workers() before using it
This allows us to build against liburing as old as version 2.0, which is apparently shipped by the latest Amazon Linux distribution. Fixes: #147
- Loading branch information
1 parent
d09b784
commit dcbcf7f
Showing
3 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright © Tavian Barnes <[email protected]> | ||
// SPDX-License-Identifier: 0BSD | ||
|
||
#include <liburing.h> | ||
|
||
int main(void) { | ||
struct io_uring ring; | ||
io_uring_queue_init(1, &ring, 0); | ||
unsigned int values[] = {0, 0}; | ||
return io_uring_register_iowq_max_workers(&ring, values); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters