summaryrefslogtreecommitdiff
path: root/mount/debian/patches/mount-cftime-is-not-64-aware.patch
blob: 0d50e9a33fc7b8d8934ffd0a6585d97e370f0fa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Index: util-illumos/usr/src/cmd/fs.d/mount.c
===================================================================
--- util-illumos.orig/usr/src/cmd/fs.d/mount.c	2012-10-08 00:25:23.000000000 +0000
+++ util-illumos/usr/src/cmd/fs.d/mount.c	2013-01-15 04:40:47.615349000 +0000
@@ -41,6 +41,7 @@
 #include	<sys/types.h>
 #include	<sys/stat.h>
 #include	<sys/statvfs.h>
+#include    <time.h>
 #include	<errno.h>
 #include	<sys/mnttab.h>
 #include	<sys/mntent.h>
@@ -609,6 +610,7 @@
 	char	time_buf[TIME_MAX];	/* array to hold date and time */
 	struct extmnttab	mget;
 	time_t	ltime;
+    struct tm *t;
 
 	if ((fd = fopen(mnttab, "r")) == NULL) {
 		fprintf(stderr, gettext("%s: Cannot open mnttab\n"), myname);
@@ -622,7 +624,8 @@
 		if (mget.mnt_special && mget.mnt_mountp &&
 		    mget.mnt_fstype && mget.mnt_time) {
 			ltime = atol(mget.mnt_time);
-			cftime(time_buf, FORMAT, &ltime);
+            t = localtime(&ltime);
+            strftime(time_buf, TIME_MAX, FORMAT, t);
 			if (pflg) {
 				elide_dev(mget.mnt_mntopts);
 				printf("%s - %s %s - no %s\n",