The build was failing, because rts/OSThreads.h via Rts.h from
libraries/bytestring/cbits/is-valid-utf8.c had no definition of
`clockid_t`. This type is not exposed with _POSIX_C_SOURCE is
not defined to a sufficiently high value:
SYNOPSIS
#include
int clock_getres(clockid_t clockid, struct timespec *res);
int clock_gettime(clockid_t clockid, struct timespec *tp);
int clock_settime(clockid_t clockid, const struct timespec *tp);
Link with -lrt (only for glibc versions before 2.17).
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
clock_getres(), clock_gettime(), clock_settime():
_POSIX_C_SOURCE >= 199309L
I quick-and-dirty work-around was:
--- a/libraries/bytestring/cbits/is-valid-utf8.c
+++ b/libraries/bytestring/cbits/is-valid-utf8.c
@@ -27,6 +27,10 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200809L
+#undef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 700
#pragma GCC push_options
#pragma GCC optimize("-O2")
#include
There's surely a better solution.
--
Viktor.