cf: Resolve implicit function definition for memset 31/14631/4
authorCheyenne Wills <cwills@sinenomine.net>
Fri, 4 Jun 2021 16:18:39 +0000 (10:18 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Thu, 10 Jun 2021 16:29:09 +0000 (12:29 -0400)
commitfd5aa52ef8ce719502f970ab93ffde07d7ed4780
treee7657b5b7ea3072a464a9eafa2f3bb807c7e0e3c
parentb60754ed1c1f2d1593ffc35a5febf39a50404134
cf: Resolve implicit function definition for memset

The autoconf function OPENAFS_HAVE_STRUCT_FIELD can produce a compiler
warning for an implicit function definition for memset, however with
macOS 11 (Big Sur) the default compiler flags have been changed
(-Werror=implicit-function-declaration) so that this is now flagged as an
error. As an error this can lead to an incorrect result returned by
OPENAFS_HAVE_STRUCT_FIELD.

Add an include for <string.h> to provide the necessary definition for
memset.

Note, both gcc and clang can produce the implicit function definition
warning.

Change-Id: I05ea43e1712c0450b7d1a78d4e953bfad9be28b9
Reviewed-on: https://gerrit.openafs.org/14631
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/cf/have-struct-field.m4