diff options
| author | Khem Raj <raj.khem@gmail.com> | 2020-11-15 13:26:13 -0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2020-11-15 13:27:46 -0800 |
| commit | f7a175c5b4608db40823dcf0df5cba46fc5778af (patch) | |
| tree | e2831dbc4469533ea1d883dd2d988206c3ba07cd | |
| parent | 57e7a27620a5cbe1809f5b19121d8e9795f8e1e4 (diff) | |
| download | meta-openembedded-f7a175c5b4608db40823dcf0df5cba46fc5778af.tar.gz | |
opensaf: Fix build on 32bit arches with 64bit time_t e.g. RISCV-32
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-networking/recipes-daemons/opensaf/opensaf/0001-Use-correct-printf-format-for-__fsblkcnt_t.patch | 36 | ||||
| -rw-r--r-- | meta-networking/recipes-daemons/opensaf/opensaf_5.20.08.bb | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-Use-correct-printf-format-for-__fsblkcnt_t.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-Use-correct-printf-format-for-__fsblkcnt_t.patch new file mode 100644 index 0000000000..0e113f533f --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-Use-correct-printf-format-for-__fsblkcnt_t.patch | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | From 90f81c1fb3e560cfc99ee7ab9a48a1736e3929cd Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sun, 15 Nov 2020 13:22:31 -0800 | ||
| 4 | Subject: [PATCH] Use correct printf format for __fsblkcnt_t | ||
| 5 | |||
| 6 | This depends on time_t size and on some 32bit architectures e.g. riscv32 | ||
| 7 | this would be a 64bit value | ||
| 8 | |||
| 9 | Fixes | ||
| 10 | os_defs.c:920:40: error: format '%ld' expects argument of type 'long int', but argument 3 has type '__fsblkcnt_t' {aka 'long long unsigned int'} [-Werror=format=] | ||
| 11 | |||
| 12 | Upstream-Status: Pending | ||
| 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 14 | --- | ||
| 15 | src/base/os_defs.c | 4 ++++ | ||
| 16 | 1 file changed, 4 insertions(+) | ||
| 17 | |||
| 18 | diff --git a/src/base/os_defs.c b/src/base/os_defs.c | ||
| 19 | index 83458c2..655c190 100644 | ||
| 20 | --- a/src/base/os_defs.c | ||
| 21 | +++ b/src/base/os_defs.c | ||
| 22 | @@ -917,7 +917,11 @@ uint32_t ncs_os_posix_shm(NCS_OS_POSIX_SHM_REQ_INFO *req) | ||
| 23 | ((statsvfs.f_bfree - 1) * statsvfs.f_frsize)) { | ||
| 24 | syslog( | ||
| 25 | LOG_ERR, | ||
| 26 | +#if __TIMESIZE == 64 && __WORDSIZE == 32 | ||
| 27 | + "Insufficient shared memory (%lld) to write the data of size: %" PRId64 | ||
| 28 | +#else | ||
| 29 | "Insufficient shared memory (%ld) to write the data of size: %" PRId64 | ||
| 30 | +#endif | ||
| 31 | "\n", | ||
| 32 | (statsvfs.f_bfree * statsvfs.f_frsize), | ||
| 33 | req->info.write.i_write_size); | ||
| 34 | -- | ||
| 35 | 2.29.2 | ||
| 36 | |||
diff --git a/meta-networking/recipes-daemons/opensaf/opensaf_5.20.08.bb b/meta-networking/recipes-daemons/opensaf/opensaf_5.20.08.bb index 7c7051eff3..5516fc43ae 100644 --- a/meta-networking/recipes-daemons/opensaf/opensaf_5.20.08.bb +++ b/meta-networking/recipes-daemons/opensaf/opensaf_5.20.08.bb | |||
| @@ -27,6 +27,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \ | |||
| 27 | file://0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch \ | 27 | file://0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch \ |
| 28 | file://0001-immom_python-convert-to-python3.patch \ | 28 | file://0001-immom_python-convert-to-python3.patch \ |
| 29 | file://0001-Fix-build-with-fno-common.patch \ | 29 | file://0001-Fix-build-with-fno-common.patch \ |
| 30 | file://0001-Use-correct-printf-format-for-__fsblkcnt_t.patch \ | ||
| 30 | " | 31 | " |
| 31 | SRC_URI[md5sum] = "02cfe732d194339237da6adce8e54384" | 32 | SRC_URI[md5sum] = "02cfe732d194339237da6adce8e54384" |
| 32 | SRC_URI[sha256sum] = "84268b90dc48a6675e5a77e2b20390a04bb59deb48a829102a9dbc4b9ac27483" | 33 | SRC_URI[sha256sum] = "84268b90dc48a6675e5a77e2b20390a04bb59deb48a829102a9dbc4b9ac27483" |
