Fixed implicit-function-declaration warning for strncasecmp
authorGeorge Nash <george.nash@intel.com>
Thu, 8 Sep 2016 00:28:48 +0000 (17:28 -0700)
committerRick Bell <richard.s.bell@intel.com>
Fri, 9 Sep 2016 16:40:35 +0000 (16:40 +0000)
commitaf5c30a18223f4445f7f32e7f0276697a3953ffc
tree8e553c831969dda7e7b6cc0da4f847adfb646050
parent00516dabff695ec2a33912b37030859c9788557f
Fixed implicit-function-declaration warning for strncasecmp

Both csdk/security/src/aclresource.c and
csdk/security/src/pstatresource.c reports that there is an
implicit declaration of function 'strncasecmp' this means
the code does not see the 'strncasecmp' function from the
header.

The 'strncasecmp function exist in the strings.h header or
in string.h header. To have the funtion in the string.h
header the _GNU_SOURCE or _DEFAULT_SOURCE macro must be
defined.

Since aclresource.c explicity excludes strings.h if string.h
is found the _GNU_SOURCE macro was added.

The _GNU_SOURCE macro was used over the _DEFAULT_SOURCE
macro since there already apears to be a presidence for
the _GNU_SOURCE macro elsewhere in the code.

Change-Id: I2d29521d0f28811be2a58349a5bc8be39b17d76e
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11529
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
Tested-by: Rick Bell <richard.s.bell@intel.com>
resource/csdk/security/SConscript