Skip to content

Commit 34af48e

Browse files
committed
Fix build with glib-2.81 or earlier
1 parent 5c65dad commit 34af48e

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/gtk-sat-map.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,7 +1629,11 @@ static void sort_points_x(GtkSatMap * satmap, sat_t * sat,
16291629
{
16301630
gsize size = 2 * sizeof(double);
16311631

1632+
#if GLIB_CHECK_VERSION(2, 82, 0)
16321633
g_sort_array(points->coords, num, size, compare_coordinates_x, NULL);
1634+
#else
1635+
g_qsort_with_data(points->coords, num, size, compare_coordinates_x, NULL);
1636+
#endif
16331637

16341638
/* move point at position 0 to position 1 */
16351639
points->coords[2] = satmap->x0;
@@ -1682,7 +1686,11 @@ static void sort_points_y(GtkSatMap * satmap, sat_t * sat,
16821686
(void)sat;
16831687
size = 2 * sizeof(double);
16841688

1689+
#if GLIB_CHECK_VERSION(2, 82, 0)
16851690
g_sort_array(points->coords, num, size, compare_coordinates_y, NULL);
1691+
#else
1692+
g_qsort_with_data(points->coords, num, size, compare_coordinates_y, NULL);
1693+
#endif
16861694
}
16871695

16881696
/**

0 commit comments

Comments
 (0)