summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch16
1 files changed, 8 insertions, 8 deletions
diff --git a/meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch b/meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
index 3f4d4de080..8d71ecbc0f 100644
--- a/meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
+++ b/meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
@@ -1,7 +1,7 @@
1From b45ea3bfd6635744c8a6b74d0ac701b44bb1d294 Mon Sep 17 00:00:00 2001 1From 83944758dc0703afea81f3c7aa0ad926bc5df757 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:19:37 +0000 3Date: Mon, 14 Dec 2015 00:47:53 +0000
4Subject: [PATCH 08/11] util: bypass unimplemented _SC_PHYS_PAGES system 4Subject: [PATCH 08/16] util: bypass unimplemented _SC_PHYS_PAGES system
5 configuration API on uclibc 5 configuration API on uclibc
6 6
7Upstream-Status: Inappropriate [uclibc-specific] 7Upstream-Status: Inappropriate [uclibc-specific]
@@ -12,10 +12,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 1 file changed, 15 insertions(+) 12 1 file changed, 15 insertions(+)
13 13
14diff --git a/src/basic/util.c b/src/basic/util.c 14diff --git a/src/basic/util.c b/src/basic/util.c
15index 72f4665..cbbe3b1 100644 15index 9e0b576..65f0edf 100644
16--- a/src/basic/util.c 16--- a/src/basic/util.c
17+++ b/src/basic/util.c 17+++ b/src/basic/util.c
18@@ -6793,10 +6793,25 @@ uint64_t physical_memory(void) { 18@@ -769,10 +769,25 @@ uint64_t physical_memory(void) {
19 /* We return this as uint64_t in case we are running as 32bit 19 /* We return this as uint64_t in case we are running as 32bit
20 * process on a 64bit kernel with huge amounts of memory */ 20 * process on a 64bit kernel with huge amounts of memory */
21 21
@@ -25,7 +25,7 @@ index 72f4665..cbbe3b1 100644
25+ if (f == NULL) 25+ if (f == NULL)
26+ return 0; 26+ return 0;
27+ while (!feof(f) && fgets(line, sizeof(line)-1, f)) { 27+ while (!feof(f) && fgets(line, sizeof(line)-1, f)) {
28+ if (sscanf(line, "MemTotal: %l kB", &mem) == 1) { 28+ if (sscanf(line, "MemTotal: %li kB", &mem) == 1) {
29+ mem *= 1024; 29+ mem *= 1024;
30+ break; 30+ break;
31+ } 31+ }
@@ -40,7 +40,7 @@ index 72f4665..cbbe3b1 100644
40+#endif 40+#endif
41 } 41 }
42 42
43 void hexdump(FILE *f, const void *p, size_t s) { 43 int update_reboot_param_file(const char *param) {
44-- 44--
452.1.4 452.6.4
46 46