mescc: Mes C Library: Support gcc-4.6.4: Fix ctime stub.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sat, 23 Nov 2019 20:35:05 +0000 (21:35 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sat, 23 Nov 2019 20:35:05 +0000 (21:35 +0100)
* lib/stub/ctime.c (ctime): Fix stub to avoid segfault upon use.

lib/stub/ctime.c

index 6b762edfa04f667df73db36f6144b51df61cb84e..0d3be24208a2d84ff8c0bd6236bf7a305c86a5be 100644 (file)
 #include <errno.h>
 #include <time.h>
 
-int
-ctime (int x)
+char *
+ctime (time_t const *time)
 {
   static int stub = 0;
   if (__mes_debug () && !stub)
     eputs ("ctime stub\n");
   stub = 1;
   errno = 0;
-  return 0;
+  return "now";
 }