$OpenBSD: patch-examples_libsmbclient_teststat_c,v 1.1.1.1 2014/05/04 16:08:29 zhuk Exp $
Use safe and generic approach for time_t.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9889
--- examples/libsmbclient/teststat.c.orig	Mon Apr  8 20:06:15 2013
+++ examples/libsmbclient/teststat.c	Mon Apr  8 20:08:46 2013
@@ -47,10 +47,10 @@ int main(int argc, char * argv[]) 
         return 1;
     }
     
-    printf("\nSAMBA\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
-           st.st_mtime, ctime_r(&st.st_mtime, m_time),
-           st.st_ctime, ctime_r(&st.st_ctime, c_time),
-           st.st_atime, ctime_r(&st.st_atime, a_time)); 
+    printf("\nSAMBA\n mtime:%lld/%s ctime:%lld/%s atime:%llu/%s\n",
+           (long long)st.st_mtime, ctime_r(&st.st_mtime, m_time),
+           (long long)st.st_ctime, ctime_r(&st.st_ctime, c_time),
+           (long long)st.st_atime, ctime_r(&st.st_atime, a_time)); 
     
     if (pLocalPath != NULL)
     {
@@ -60,10 +60,10 @@ int main(int argc, char * argv[]) 
             return 1;
         }
         
-        printf("LOCAL\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
-               st.st_mtime, ctime_r(&st.st_mtime, m_time),
-               st.st_ctime, ctime_r(&st.st_ctime, c_time),
-               st.st_atime, ctime_r(&st.st_atime, a_time)); 
+        printf("LOCAL\n mtime:%lld/%s ctime:%lld/%s atime:%lld/%s\n",
+               (long long)st.st_mtime, ctime_r(&st.st_mtime, m_time),
+               (long long)st.st_ctime, ctime_r(&st.st_ctime, c_time),
+               (long long)st.st_atime, ctime_r(&st.st_atime, a_time)); 
     }
 
     return 0; 
