Include <strings.h> for strcasecmp
ClosedPublic

Authored by heikobecker on Mar 8 2019, 3:51 PM.

Details

Summary

POSIX states [1] that it is in the <strings.h> include file, not
<string.h>. While it's likely pulled in implicitly for glibc, its
absence causes a build error with musl libc
(src/wmlib/cdrom.c:128:33: error: implicit declaration of function
'strcasecmp';).

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/strcasecmp.html

Test Plan

Builds fine with glibc and musl libcs.

Diff Detail

Repository
R349 KCompactDisc Library
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
heikobecker requested review of this revision.Mar 8 2019, 3:51 PM
heikobecker created this revision.
mpyne accepted this revision.Mar 23 2019, 2:38 PM

Looks good. The way these compat changes normally impact working code against glibc / FreeBSD is to accidentally enable stricter symbol definitions, that shouldn't be an issue here and I've confirmed the header is also present on FreeBSD.

This revision is now accepted and ready to land.Mar 23 2019, 2:38 PM
This revision was automatically updated to reflect the committed changes.