From d88c59aab4e7ccd18ce07ff3ab29b5f3086dbae3 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 26 Sep 2018 22:47:58 +0000 Subject: [PATCH] bugfixes for ARM --- lib/kernel/kernel.c | 2 +- lib/log_helper.c | 2 +- lib/memory.c | 2 +- src/villas-node.cpp | 2 +- src/villas-pipe.cpp | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/kernel/kernel.c b/lib/kernel/kernel.c index aa9dacd19..08538c8ab 100644 --- a/lib/kernel/kernel.c +++ b/lib/kernel/kernel.c @@ -38,7 +38,7 @@ int kernel_get_cacheline_size() { -#ifdef __linux__ +#if defined(__linux__) && defined(__x86_64__) return sysconf(_SC_LEVEL1_ICACHE_LINESIZE); #else return 64; /** @todo fixme */ diff --git a/lib/log_helper.c b/lib/log_helper.c index e263ee0c6..3a90e6090 100644 --- a/lib/log_helper.c +++ b/lib/log_helper.c @@ -27,7 +27,7 @@ #include #include -void debug(long class, const char *fmt, ...) +void debug(long long class, const char *fmt, ...) { va_list ap; diff --git a/lib/memory.c b/lib/memory.c index 86a6c9c5a..24eb0b952 100644 --- a/lib/memory.c +++ b/lib/memory.c @@ -53,7 +53,7 @@ int memory_init(int hugepages) { info("Initialize memory sub-system: #hugepages=%d", hugepages); -#ifdef __linux__ +#if defined(__linux__) && defined(__x86_64__) int pagecnt, pagesz, ret; struct rlimit l; diff --git a/src/villas-node.cpp b/src/villas-node.cpp index 037b3f38f..3a1f8a7f0 100644 --- a/src/villas-node.cpp +++ b/src/villas-node.cpp @@ -117,7 +117,7 @@ int main(int argc, char *argv[]) const char *uri = "opal-shmem.conf"; #else - char c; + int c; while ((c = getopt(argc, argv, "hV")) != -1) { switch (c) { case 'V': diff --git a/src/villas-pipe.cpp b/src/villas-pipe.cpp index 81996a2c1..39733ba19 100644 --- a/src/villas-pipe.cpp +++ b/src/villas-pipe.cpp @@ -255,7 +255,8 @@ int main(int argc, char *argv[]) json_t *cfg_cli = json_object(); - char c, *endptr; + int c; + char *endptr; while ((c = getopt(argc, argv, "Vhxrsd:l:L:t:f:o:")) != -1) { switch (c) { case 'V':