The mass rebuild of OpenChange  shows a failure of the build due to reference
to memset_s() in macros provided by samba. Part of the error message is here .
Am I able to do anything about it in the openchange package? Eventually, am I supposed to do anything with it at all? I mean, it feels like a regression, but I do not know whether the memset_s() had been used in those macros before. If the memset_s() requires any special defines being defined, then those should be added by samba headers.
I tried to move ndr.h include as the first include in the openchange's ndr_mapi.c file, but it didn't help at all . My idea was that maybe something includes string.h before samba has a chance to influence it, but it was not it.
 Part of the build log from :
Compiling ndr_mapi.c with -fPIC
BUILDSTDERR: In file included from /usr/include/samba-4.0/ndr.h:29,
BUILDSTDERR: from /usr/include/samba-4.0/dcerpc.h:32,
BUILDSTDERR: from libmapi/libmapi.h:45,
BUILDSTDERR: from ndr_mapi.c:22:
BUILDSTDERR: ndr_mapi.c: In function 'ndr_pull_EcDoRpc':
BUILDSTDERR: /usr/include/samba-4.0/util/memory.h:54:24: warning: implicit declaration of function 'memset_s'; did you mean 'memset'? [-Wimplicit-function-declaration]
BUILDSTDERR: 54 | #define ZERO_STRUCT(x) memset_s((char *)&(x), sizeof(x), 0, sizeof(x))
BUILDSTDERR: | ^~~~~~~~
BUILDSTDERR: ndr_mapi.c:924:3: note: in expansion of macro 'ZERO_STRUCT'
BUILDSTDERR: 924 | ZERO_STRUCT(r->out);
BUILDSTDERR: | ^~~~~~~~~~~
BUILDSTDERR: /usr/bin/ld: libmapi-openchange.so.2.3: undefined reference to `memset_s'
BUILDSTDERR: collect2: error: ld returned 1 exit status
BUILDSTDERR: make: *** [Makefile:450: bin/libmapixx-test] Error 1
BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.aoXFCs (%build)
Could you please open an upsteam bug too?
Here you are:
*** Bug 1673312 has been marked as a duplicate of this bug. ***
Patches at: https://gitlab.com/samba-team/samba/merge_requests/238
Inside of Samba memset_s() is available as we offer an implementation for it. However it is not available publicly.
*** Bug 1675576 has been marked as a duplicate of this bug. ***
*** Bug 1671507 has been marked as a duplicate of this bug. ***
This has been fixed in rawhide.