diff options
author | Khem Raj <raj.khem@gmail.com> | 2015-02-25 02:55:57 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-27 07:36:32 +0000 |
commit | 7ce7756adfce50ba12be319b1f087f31064376b8 (patch) | |
tree | 7b3711747179173aec5a9f63359f47daeadb7657 /meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch | |
parent | 3af8d90203e76dc900ea10e3e81d158203ee96c8 (diff) | |
download | ast2050-yocto-poky-7ce7756adfce50ba12be319b1f087f31064376b8.zip ast2050-yocto-poky-7ce7756adfce50ba12be319b1f087f31064376b8.tar.gz |
systemd: Upgrade 218 -> 219
219 has been in the docks for sometime, the older patch got merged
this patch is now upgrading 218 to 219
Make all patches using git
Change-Id: Ib0350144592aba26cad56c13c9a5522515915c58
(From OE-Core rev: 041570e584b98b580cc75f9ee23372da74a84377)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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.patch | 46 |
1 files changed, 46 insertions, 0 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 new file mode 100644 index 0000000..5297625 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch @@ -0,0 +1,46 @@ +From b45ea3bfd6635744c8a6b74d0ac701b44bb1d294 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 20 Feb 2015 05:19:37 +0000 +Subject: [PATCH 08/11] util: bypass unimplemented _SC_PHYS_PAGES system + configuration API on uclibc + +Upstream-Status: Inappropriate [uclibc-specific] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/shared/util.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/src/shared/util.c b/src/shared/util.c +index 72f4665..cbbe3b1 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -6793,10 +6793,25 @@ uint64_t physical_memory(void) { + /* We return this as uint64_t in case we are running as 32bit + * process on a 64bit kernel with huge amounts of memory */ + ++#ifdef __UCLIBC__ ++ char line[128]; ++ FILE *f = fopen("/proc/meminfo", "r"); ++ if (f == NULL) ++ return 0; ++ while (!feof(f) && fgets(line, sizeof(line)-1, f)) { ++ if (sscanf(line, "MemTotal: %l kB", &mem) == 1) { ++ mem *= 1024; ++ break; ++ } ++ } ++ fclose(f); ++ return (uint64_t) mem; ++#else + mem = sysconf(_SC_PHYS_PAGES); + assert(mem > 0); + + return (uint64_t) mem * (uint64_t) page_size(); ++#endif + } + + void hexdump(FILE *f, const void *p, size_t s) { +-- +2.1.4 + |