--- ./tvheadend-git/src/queue.h 2018-11-10 18:57:53.330002052 +0100 +++ ./tvheadend-git.mod/src/queue.h 2018-11-10 23:56:58.723197097 +0100 @@ -92,7 +92,7 @@ } else { \ typeof(elm) _tmp; \ TAILQ_FOREACH_REVERSE(_tmp,head,headname,field) { \ - if(cmpfunc(elm,_tmp) >= 0) { \ + if(cmpfunc(_tmp,elm) >= 0) { \ TAILQ_INSERT_AFTER(head,_tmp,elm,field); \ break; \ } \