Use the renamed component cloning API with libical 4, while retaining compatibility with older libical. Bug: https://bugs.gentoo.org/987596 --- a/calendar.c +++ b/calendar.c @@ -342,7 +342,11 @@ struct calobj *newobj; icalcomponent *newcomp = malloc(sizeof(struct calobj)); char* buf = malloc (strlen(text) + 1); +#if ICAL_CHECK_VERSION(4, 0, 0) + newcomp = icalcomponent_clone(d); +#else newcomp = icalcomponent_new_clone(d); +#endif strcpy(buf,text); newobj = malloc(sizeof(struct calobj)); newobj->comp = newcomp;