File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,7 +68,11 @@ public class Maya.Model.CalendarModel : Object {
6868 }
6969
7070 private CalendarModel () {
71+ #if HAVE_NL_TIME_FIRST_WEEKDAY
7172 int week_start = Posix . NLTime . FIRST_WEEKDAY. to_string (). data[0 ];
73+ #else
74+ int week_start = 0 ;
75+ #endif
7276 if (week_start >= 1 && week_start <= 7 ) {
7377 week_starts_on = (Maya . Settings . Weekday )week_start- 1 ;
7478 }
Original file line number Diff line number Diff line change @@ -31,13 +31,18 @@ folks_dep = dependency('folks')
3131geocode_glib_dep = dependency (' geocode-glib-1.0' )
3232gclue_dep = dependency (' libgeoclue-2.0' )
3333
34- m_dep = meson .get_compiler(' c' ).find_library (' m' , required : false )
34+ cc = meson .get_compiler(' c' )
35+ m_dep = cc.find_library (' m' , required : false )
3536libnotify_dep = dependency (' libnotify' , required : false )
3637
3738if libnotify_dep.found()
3839 add_project_arguments (' --define=HAVE_LIBNOTIFY' , language : ' vala' )
3940endif
4041
42+ if cc.has_header_symbol(' langinfo.h' , ' _NL_TIME_FIRST_WEEKDAY' )
43+ add_project_arguments (' --define=HAVE_NL_TIME_FIRST_WEEKDAY' , language : ' vala' )
44+ endif
45+
4146gresource_calendar = gnome.compile_resources(
4247 ' gresource_calendar' ,
4348 ' data/maya.gresource.xml' ,
You can’t perform that action at this time.
0 commit comments