try to work with libical1 and libical2
[citadel.git] / citadel / modules / calendar / serv_calendar.c
index 5fc4bffc41d9c782e5edc150a36de194b6d351a5..4e296fd4abac24d723b737b9f1365a208f1864f3 100644 (file)
@@ -2580,8 +2580,12 @@ CTDL_MODULE_INIT(calendar)
        {
 
                /* Tell libical to return errors instead of aborting if it gets bad data */
-               // icalerror_errors_are_fatal = 0; (this was the old way)
+
+#ifdef LIBICAL_ICAL_EXPORT     // cheap and sleazy way to detect libical >=2.0
                icalerror_set_errors_are_fatal(0);
+#else
+               icalerror_errors_are_fatal = 0; (this was the old way)
+#endif
 
                /* Use our own application prefix in tzid's generated from system tzdata */
                icaltimezone_set_tzid_prefix("/citadel.org/");