Fredrik Fornwall
7 years ago
5 changed files with 5 additions and 69 deletions
@ -1,16 +0,0 @@ |
|||||
diff -u -r ../util-linux-2.28/include/c.h ./include/c.h
|
|
||||
--- ../util-linux-2.28/include/c.h 2016-03-08 08:25:50.553182767 -0500
|
|
||||
+++ ./include/c.h 2016-06-22 06:24:22.916322177 -0400
|
|
||||
@@ -257,10 +257,12 @@
|
|
||||
*/ |
|
||||
static inline size_t get_hostname_max(void) |
|
||||
{ |
|
||||
+#ifndef __ANDROID__
|
|
||||
long len = sysconf(_SC_HOST_NAME_MAX); |
|
||||
|
|
||||
if (0 < len) |
|
||||
return len; |
|
||||
+#endif
|
|
||||
|
|
||||
#ifdef MAXHOSTNAMELEN |
|
||||
return MAXHOSTNAMELEN; |
|
@ -1,16 +0,0 @@ |
|||||
diff -u -r ../util-linux-2.28/lib/monotonic.c ./lib/monotonic.c
|
|
||||
--- ../util-linux-2.28/lib/monotonic.c 2016-02-19 05:30:53.576131474 -0500
|
|
||||
+++ ./lib/monotonic.c 2016-06-23 06:09:05.035726383 -0400
|
|
||||
@@ -26,6 +26,12 @@
|
|
||||
if (gettimeofday(&now, NULL) != 0) |
|
||||
return -errno; |
|
||||
#ifdef CLOCK_BOOTTIME |
|
||||
+#ifdef __ANDROID__
|
|
||||
+#define TIMESPEC_TO_TIMEVAL(tv, ts) { \
|
|
||||
+ (tv)->tv_sec = (ts)->tv_sec; \
|
|
||||
+ (tv)->tv_usec = (ts)->tv_nsec / 1000; \
|
|
||||
+}
|
|
||||
+#endif
|
|
||||
if (clock_gettime(CLOCK_BOOTTIME, &hires_uptime) == 0) { |
|
||||
TIMESPEC_TO_TIMEVAL(&lores_uptime, &hires_uptime); |
|
||||
timersub(&now, &lores_uptime, boot_time); |
|
@ -1,22 +0,0 @@ |
|||||
diff -u -r ../util-linux-2.28/sys-utils/dmesg.c ./sys-utils/dmesg.c
|
|
||||
--- ../util-linux-2.28/sys-utils/dmesg.c 2016-03-16 05:39:39.246181199 -0400
|
|
||||
+++ ./sys-utils/dmesg.c 2016-06-23 06:15:22.841546295 -0400
|
|
||||
@@ -11,7 +11,7 @@
|
|
||||
#include <getopt.h> |
|
||||
#include <stdlib.h> |
|
||||
#include <sys/klog.h> |
|
||||
-#include <sys/syslog.h>
|
|
||||
+#include <syslog.h>
|
|
||||
#include <sys/time.h> |
|
||||
#include <sys/sysinfo.h> |
|
||||
#include <ctype.h> |
|
||||
@@ -894,6 +894,9 @@
|
|
||||
* backward compatibility with syslog(2) buffers only |
|
||||
*/ |
|
||||
if (ctl->raw) { |
|
||||
+#ifdef __ANDROID__
|
|
||||
+#define LOG_MAKEPRI(fac, pri) ((fac) | (pri))
|
|
||||
+#endif
|
|
||||
ctl->indent = printf("<%d>[%5ld.%06ld] ", |
|
||||
LOG_MAKEPRI(rec->facility, rec->level), |
|
||||
(long) rec->tv.tv_sec, |
|
@ -1,12 +0,0 @@ |
|||||
diff -u -r ../util-linux-2.28/text-utils/column.c ./text-utils/column.c
|
|
||||
--- ../util-linux-2.28/text-utils/column.c 2016-01-13 04:06:20.659478041 -0500
|
|
||||
+++ ./text-utils/column.c 2016-06-22 06:32:49.528395388 -0400
|
|
||||
@@ -68,7 +68,7 @@
|
|
||||
#define DEFCOLS 25 |
|
||||
#define TAB 8 |
|
||||
#define DEFNUM 1000 |
|
||||
-#define MAXLINELEN (LINE_MAX + 1)
|
|
||||
+#define MAXLINELEN (_POSIX2_LINE_MAX + 1)
|
|
||||
|
|
||||
static int input(FILE *fp, int *maxlength, wchar_t ***list, int *entries); |
|
||||
static void c_columnate(int maxlength, long termwidth, wchar_t **list, int entries); |
|
Loading…
Reference in new issue