+#if PHP_VERSION_ID >= 80000
+int php_pq_compare_index(Bucket *lptr, Bucket *rptr)
+{
+ return compare_index(lptr->h, rptr->h);
+}
+#else
+int php_pq_compare_index(const void *lptr, const void *rptr) {
+ return compare_index(((const Bucket *) lptr)->h, ((const Bucket *) rptr)->h);
+}
+#endif