summaryrefslogblamecommitdiff
path: root/user/bluez/time64.patch
blob: 7822558172da6be807f9f08f086e2a5293c8c56c (plain) (tree)
1
2
3
4
5
6
7
8






                                                                             
                                                                                 









































































                                                                                               
--- bluez-5.53/monitor/packet.c.old	2020-02-15 18:33:56.000000000 +0000
+++ bluez-5.53/monitor/packet.c	2020-02-25 09:24:09.629224611 +0000
@@ -364,7 +364,7 @@
 		}
 
 		if (filter_mask & PACKET_FILTER_SHOW_TIME) {
-			n = sprintf(ts_str + ts_pos, " %02d:%02d:%02d.%06lu",
+			n = sprintf(ts_str + ts_pos, " %02d:%02d:%02d.%06"PRIu64,
 				tm.tm_hour, tm.tm_min, tm.tm_sec, tv->tv_usec);
 			if (n > 0) {
 				ts_pos += n;
@@ -373,7 +373,7 @@
 		}
 
 		if (filter_mask & PACKET_FILTER_SHOW_TIME_OFFSET) {
-			n = sprintf(ts_str + ts_pos, " %lu.%06lu",
+			n = sprintf(ts_str + ts_pos, " %"PRIu64".%06"PRIu64,
 					tv->tv_sec - time_offset, tv->tv_usec);
 			if (n > 0) {
 				ts_pos += n;
--- bluez-5.53/tools/parser/parser.h.old	2015-10-30 03:30:13.000000000 +0000
+++ bluez-5.53/tools/parser/parser.h	2020-02-25 09:26:51.471579651 +0000
@@ -26,6 +26,7 @@
 #define __PARSER_H
 
 #include <time.h>
+#include <inttypes.h>
 #include <sys/time.h>
 #include <netinet/in.h>
 
@@ -133,11 +134,11 @@
 				struct tm tm;
 				time_t t = f->ts.tv_sec;
 				localtime_r(&t, &tm);
-				printf("%04d-%02d-%02d %02d:%02d:%02d.%06lu ",
+				printf("%04d-%02d-%02d %02d:%02d:%02d.%06"PRIu64" ",
 					tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
 					tm.tm_hour, tm.tm_min, tm.tm_sec, f->ts.tv_usec);
 			} else
-				printf("%8lu.%06lu ", f->ts.tv_sec, f->ts.tv_usec);
+				printf("%8"PRIu64".%06"PRIu64" ", f->ts.tv_sec, f->ts.tv_usec);
 		}
 		printf("%c ", (f->in ? '>' : '<'));
 		parser.state = 1;
--- bluez-5.53/tools/rctest.c.old	2019-09-19 18:51:03.000000000 +0000
+++ bluez-5.53/tools/rctest.c	2020-02-25 09:24:56.994060632 +0000
@@ -36,6 +36,7 @@
 #include <getopt.h>
 #include <syslog.h>
 #include <signal.h>
+#include <inttypes.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
@@ -513,7 +514,7 @@
 					timestamp = 0;
 					memset(ts, 0, sizeof(ts));
 				} else {
-					sprintf(ts, "[%ld.%ld] ",
+					sprintf(ts, "[%"PRId64".%"PRId64"] ",
 							tv.tv_sec, tv.tv_usec);
 				}
 			}
--- bluez-5.53/tools/l2test.c.old	2019-09-19 18:51:03.000000000 +0000
+++ bluez-5.53/tools/l2test.c	2020-02-25 09:27:47.325490145 +0000
@@ -38,6 +38,7 @@
 #include <getopt.h>
 #include <syslog.h>
 #include <signal.h>
+#include <inttypes.h>
 #include <sys/time.h>
 #include <poll.h>
 #include <sys/ioctl.h>
@@ -915,7 +916,7 @@
 					timestamp = 0;
 					memset(ts, 0, sizeof(ts));
 				} else {
-					sprintf(ts, "[%ld.%ld] ",
+					sprintf(ts, "[%"PRId64".%"PRId64"] ",
 							tv.tv_sec, tv.tv_usec);
 				}
 			}