same fix in webcit
authorArt Cancro <ajc@citadel.org>
Thu, 26 Oct 2017 02:58:04 +0000 (22:58 -0400)
committerArt Cancro <ajc@citadel.org>
Thu, 26 Oct 2017 02:58:04 +0000 (22:58 -0400)
webcit/webserver.c

index e0e6e403bb4389eb750cd211973934d6d50a025e..99e303a098ddfb9aedc85d9a9fc353454ae321a4 100644 (file)
@@ -272,7 +272,12 @@ int main(int argc, char **argv)
        }
 
        /* Tell libical to return an error instead of aborting if it sees badly formed iCalendar data. */
-       icalerror_errors_are_fatal = 0;
+
+#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;
+#endif
 
        /* Use our own prefix on tzid's generated from system tzdata */
        icaltimezone_set_tzid_prefix("/citadel.org/");