openipmi: fix collectd assertion

This commit is contained in:
Sandro Jäckel 2021-08-27 18:47:14 +02:00
parent 94db887ac7
commit c97d75e8e5
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
2 changed files with 17 additions and 0 deletions

View File

@ -9,6 +9,12 @@ stdenv.mkDerivation rec {
sha256 = "05wpkn74nxqp5p6sa2yaf2ajrh8b0gfkb7y4r86lnigz4rvz6lkh";
};
patches = [
# fix assertion when used as a library in collectd
# taken from https://sourceforge.net/p/openipmi/code/ci/d613d279dbce2d5e4594f6fed39653d83af0d99b/
./fix-collectd-assertion.diff
];
buildInputs = [ ncurses popt python3 readline ];
outputs = [ "out" "lib" "dev" "man" ];

View File

@ -0,0 +1,11 @@
--- a/unix/posix_thread_os_hnd.c
+++ b/unix/posix_thread_os_hnd.c
@@ -140,8 +140,6 @@
fd_data->data_ready = data_ready;
fd_data->handler = handler;
fd_data->freed = freed;
- sel_set_fd_write_handler(posix_sel, fd, SEL_FD_HANDLER_DISABLED);
- sel_set_fd_except_handler(posix_sel, fd, SEL_FD_HANDLER_DISABLED);
rv = sel_set_fd_handlers(posix_sel, fd, fd_data, fd_handler, NULL, NULL,
free_fd_data);
if (rv) {