From 4f2f73844f1d0f07f3e0fd48079d00be2733533e Mon Sep 17 00:00:00 2001 From: Andres Notzli Date: Thu, 13 Oct 2016 17:34:38 -0700 Subject: Fix build on macOS Sierra Before this fix, the build died with `ar: no archive members specified when linking the empty libreplacements.la.` because macOS Sierra does not require the replacements anymore. With this fix, `ffs.c` and `strtok_r.c` are always getting compiled (even when they are empty) to prevent the error. Also removed the unused `CVC4_NEEDS_REPLACEMENT_FUNCTIONS` from `configure.ac` and added an `#ifndef HAVE_FFS` to `ffs.c` for consistency with `strtok_r.c`. --- src/lib/ffs.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/lib/ffs.c b/src/lib/ffs.c index 81228be63..d42f9da94 100644 --- a/src/lib/ffs.c +++ b/src/lib/ffs.c @@ -21,6 +21,7 @@ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ +#ifndef HAVE_FFS int ffs(int i) { long mask = 0x1; @@ -35,6 +36,7 @@ int ffs(int i) { return 0; } +#endif /* ifndef HAVE_FFS */ #ifdef __cplusplus }/* extern "C" */ #endif /* __cplusplus */ -- cgit v1.2.3