diff --git a/repos/libports/lib/mk/libc-gen.inc b/repos/libports/lib/mk/libc-gen.inc index 85fcd6df9a..449653f303 100644 --- a/repos/libports/lib/mk/libc-gen.inc +++ b/repos/libports/lib/mk/libc-gen.inc @@ -8,6 +8,9 @@ FILTER_OUT_C += \ devname.c feature_present.c getpagesizes.c getvfsbyname.c \ setproctitle.c sysconf.c sysctlbyname.c +# the following is a wrapper over rusage, which we cannot provide +FILTER_OUT_C += clock.c + SRC_C = $(filter-out $(FILTER_OUT_C),$(notdir $(wildcard $(LIBC_GEN_DIR)/*.c))) # 'sysconf.c' includes the local 'stdtime/tzfile.h' diff --git a/repos/libports/src/lib/libc/time.cc b/repos/libports/src/lib/libc/time.cc index c9945ac571..0ac13d4a53 100644 --- a/repos/libports/src/lib/libc/time.cc +++ b/repos/libports/src/lib/libc/time.cc @@ -6,7 +6,7 @@ */ /* - * Copyright (C) 2010-2017 Genode Labs GmbH + * Copyright (C) 2010-2018 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -18,6 +18,9 @@ #include "task.h" #include "libc_errno.h" +/* Genode includes */ +#include + namespace Libc { time_t read_rtc(); } @@ -91,3 +94,11 @@ int gettimeofday(struct timeval *tv, struct timezone *) tv->tv_usec = ts.tv_nsec / 1000; return 0; } + + +extern "C" +clock_t clock() +{ + Genode::error(__func__, " not implemented, use 'clock_gettime' instead"); + return -1; +}