From af5c30a18223f4445f7f32e7f0276697a3953ffc Mon Sep 17 00:00:00 2001 From: George Nash Date: Wed, 7 Sep 2016 17:28:48 -0700 Subject: [PATCH] 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 Reviewed-on: https://gerrit.iotivity.org/gerrit/11529 Reviewed-by: Larry Sachs Reviewed-by: Rick Bell Tested-by: Rick Bell --- resource/csdk/security/SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resource/csdk/security/SConscript b/resource/csdk/security/SConscript index 2e5e55e..4d72175 100644 --- a/resource/csdk/security/SConscript +++ b/resource/csdk/security/SConscript @@ -59,7 +59,7 @@ libocsrm_env.PrependUnique(CPPPATH = [ ]) if target_os not in ['arduino', 'windows']: - libocsrm_env.AppendUnique(CPPDEFINES = ['WITH_POSIX']) + libocsrm_env.AppendUnique(CPPDEFINES = ['WITH_POSIX', '_GNU_SOURCE']) libocsrm_env.AppendUnique(CFLAGS = ['-std=c99', '-Wall']) libocsrm_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')]) -- 2.7.4