Makefile: add pickrand
[cmccabe-bin] / simple_time.c
index 5906409..0055e1c 100644 (file)
@@ -1,3 +1,5 @@
+#define _POSIX_PTHREAD_SEMANTICS // needed for Solaris for asctime_r
+
 #include <stdio.h>
 #include <string.h>
 #include <time.h>
@@ -24,13 +26,11 @@ int main(void)
 {
        while (1) {
                char str[27];
-               size_t len;
                time_t t = time(NULL);
                struct tm *tm = localtime(&t);
 
                str[0] = '\0';
                asctime_r(tm, str);
-               len = strlen(str);
                printf("\r");
                strip_newlines(str);
                printf("%s", str);