mescc: Mes C Library: Support make: Implement clock_gettime, time.
[mes.git] / lib / linux / gnu.c
index 16237c502f7ae0ce2b7068c97ef5e5a69cc6820e..70dd5a2f9d9e401d38377479d7b22d6b556d656f 100644 (file)
  */
 
 #include <sys/resource.h>
-
-int
-chdir (char const *file_name)
-{
-  return _sys_call1 (SYS_chdir, (long)file_name);
-}
+#include <time.h>
 
 int
 link (char const *old_name, char const *new_name)
@@ -157,3 +152,15 @@ getdents (long filedes, char *buffer, size_t nbytes)
 {
   return _sys_call3 (SYS_getdents, (long)filedes, (long)buffer, (long)nbytes);
 }
+
+int
+chdir (char const *file_name)
+{
+  return _sys_call1 (SYS_chdir, (long)file_name);
+}
+
+int
+clock_gettime (clockid_t clk_id, struct timespec *tp)
+{
+  return _sys_call2 (SYS_clock_gettime, (long)clk_id, (long)tp);
+}