build: make strerror() override-able

If we want to override `strerror()` in libjson-c
to make tests consistent across platforms, we
need to do it build-wide as configure/build
option.

Apple linkers make it really hard to override functions
at link-time, and this seems to be locked down on travis-ci.org
[ for security reasons I assume ].
While I got it to work locally, it did not work
when running on travis.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
Alexandru Ardelean
2017-07-13 10:11:15 +03:00
parent 85f57859fd
commit fb72160caf
11 changed files with 46 additions and 9 deletions

View File

@@ -9,6 +9,7 @@
*
*/
#include "strerror_override.h"
#include <stdio.h>
#include "config.h"
#include "random_seed.h"
@@ -128,7 +129,6 @@ retry:
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/stat.h>