#include <strings.h> for strcasecmp in versit parser
ClosedPublic

Authored by awilcox on Oct 12 2017, 2:18 AM.

Details

Summary

The POSIX definition for strcasecmp states that it is in the <strings.h> include file, not <string.h>. This causes the following build error on the musl libc:

/usr/src/packages/user/kcalcore/src/kcalcore-17.08.1/src/versit/vcc.y: In function 'enterAttr':
 /usr/src/packages/user/kcalcore/src/kcalcore-17.08.1/src/versit/vcc.y:485:9: error: implicit definition of function 'strcasecmp' [-Werror=implicit-function-definition]

This patch fixes this error (and a few others later on in the file).

Test Plan

Built and tested on glibc and musl Linux systems; since <strings.h> is a POSIX standard, it is assumed that other Unix-based systems (such as BSD and Solaris) provide it as well.

Diff Detail

Repository
R172 KCalendar Core
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
awilcox created this revision.Oct 12 2017, 2:18 AM
Restricted Application added a project: KDE PIM. · View Herald TranscriptOct 12 2017, 2:18 AM
Restricted Application added a subscriber: KDE PIM. · View Herald Transcript
awilcox edited the summary of this revision. (Show Details)Oct 12 2017, 2:19 AM
awilcox added a reviewer: KDE PIM.
awilcox edited the summary of this revision. (Show Details)
awilcox updated this revision to Diff 20622.Oct 12 2017, 2:22 AM

Sorry, I had accidentally uploaded a WIP version of the patch. This is complete.

winterz accepted this revision.Oct 12 2017, 12:12 PM
winterz added a subscriber: winterz.

thanks.

This revision is now accepted and ready to land.Oct 12 2017, 12:12 PM

do you need me to commit for you?

This revision was automatically updated to reflect the committed changes.