Description of problem: samba-4.0/util/memory.h defines the ZERO_STRUCT macro as #define ZERO_STRUCT(x) memset_s((char *)&(x), sizeof(x), 0, sizeof(x)) however the C11 function memset_s is not available yet. There is mo function prototype in /usr/include for memset_s. I also tried gcc -std=gnu11 and -D__STDC_WANT_LIB_EXT1__=1 without success. Version-Release number of selected component (if applicable): samba-devel-4.10.0-0.0.rc1.fc30.x86_64 How reproducible: always Steps to Reproduce: 1. git clone https://github.com/freeipa/freeipa.git 2. cd freeipa 3. ./autogen.sh && make Actual results: /bin/sh ../../libtool --tag=CC --mode=compile gcc -std=gnu11 -DHAVE_CONFIG_H -I. -I../.. -I. -I../../asn1 -I/usr/include/samba-4.0 -DPREFIX=\""/usr/local"\" -DBINDIR=\""/usr/local/bin"\" -DLIBDIR=\""/usr/local/lib"\" -DLIBEXECDIR=\""/usr/local/libexec"\" -DDATADIR=\""/usr/local/share"\" -DLDAPIDIR=\""/usr/local/var/run"\" -DHAVE_LDAP -I../../util -I/usr/include/samba-4.0 -DHAVE_IMMEDIATE_STRUCTURES=1 -I/usr/include/samba-4.0 -D_GNU_SOURCE=1 -DHAVE_IMMEDIATE_STRUCTURES=1 -I/usr/include/nspr4 -I/usr/include/nss3 -I/usr/include/nspr4 -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Werror-implicit-function-declaration -D__STDC_WANT_LIB_EXT1__=1 -D_DEFAULT_SOURCE=1 -D_POSIX_C_SOURCE=200809L -Werror=implicit-function-declaration -MT ipa_sam.lo -MD -MP -MF .deps/ipa_sam.Tpo -c -o ipa_sam.lo ipa_sam.c libtool: compile: gcc -std=gnu11 -DHAVE_CONFIG_H -I. -I../.. -I. -I../../asn1 -I/usr/include/samba-4.0 -DPREFIX=\"/usr/local\" -DBINDIR=\"/usr/local/bin\" -DLIBDIR=\"/usr/local/lib\" -DLIBEXECDIR=\"/usr/local/libexec\" -DDATADIR=\"/usr/local/share\" -DLDAPIDIR=\"/usr/local/var/run\" -DHAVE_LDAP -I../../util -I/usr/include/samba-4.0 -DHAVE_IMMEDIATE_STRUCTURES=1 -I/usr/include/samba-4.0 -D_GNU_SOURCE=1 -DHAVE_IMMEDIATE_STRUCTURES=1 -I/usr/include/nspr4 -I/usr/include/nss3 -I/usr/include/nspr4 -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Werror-implicit-function-declaration -D__STDC_WANT_LIB_EXT1__=1 -D_DEFAULT_SOURCE=1 -D_POSIX_C_SOURCE=200809L -Werror=implicit-function-declaration -MT ipa_sam.lo -MD -MP -MF .deps/ipa_sam.Tpo -c ipa_sam.c -fPIC -DPIC -o .libs/ipa_sam.o In file included from /usr/include/samba-4.0/ndr.h:29, from ipa_sam.c:18: ipa_sam.c: In function ‘fill_pdb_trusted_domain’: /usr/include/samba-4.0/util/memory.h:54:24: error: implicit declaration of function ‘memset_s’; did you mean ‘memset’? [-Werror=implicit-function-declaration] 54 | #define ZERO_STRUCT(x) memset_s((char *)&(x), sizeof(x), 0, sizeof(x)) | ^~~~~~~~ ipa_sam.c:2182:3: note: in expansion of macro ‘ZERO_STRUCT’ 2182 | ZERO_STRUCT(td->security_identifier); | ^~~~~~~~~~~ cc1: some warnings being treated as errors Expected results: no compile error Additional info:
*** This bug has been marked as a duplicate of bug 1672231 ***