osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/40865?usp=email )
Change subject: tests: fix for debian 13 armv7l ......................................................................
tests: fix for debian 13 armv7l
In Debian 13 armv7l, time_t and suseconds_t are "long long int" instead of "long unsigned int" as seen on x86_64 and aarch64. Fix it by casting to "long unsigned int".
Related: OS#6828 Change-Id: I416b31dd11a82ad52f6a662d7e099123a5c77fff --- M tests/gmm/gmm_prim_test.h M tests/rlcmac/rlcmac_prim_test.c 2 files changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/65/40865/1
diff --git a/tests/gmm/gmm_prim_test.h b/tests/gmm/gmm_prim_test.h index 1e231b1..67391cb 100644 --- a/tests/gmm/gmm_prim_test.h +++ b/tests/gmm/gmm_prim_test.h @@ -10,7 +10,8 @@ osmo_clock_gettime(CLOCK_MONOTONIC, &ts); \ osmo_gettimeofday(&tv, NULL); \ fprintf(stdout, "sys={%lu.%06lu}, mono={%lu.%06lu}: " fmt "\n", \ - tv.tv_sec, tv.tv_usec, ts.tv_sec, ts.tv_nsec/1000, ##args); \ + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec, \ + (unsigned int long) ts.tv_sec, ts.tv_nsec/1000, ##args); \ } while (0)
static void clock_override_enable(bool enable) diff --git a/tests/rlcmac/rlcmac_prim_test.c b/tests/rlcmac/rlcmac_prim_test.c index 0697abf..95a50e7 100644 --- a/tests/rlcmac/rlcmac_prim_test.c +++ b/tests/rlcmac/rlcmac_prim_test.c @@ -245,7 +245,8 @@ osmo_clock_gettime(CLOCK_MONOTONIC, &ts); \ osmo_gettimeofday(&tv, NULL); \ fprintf(stdout, "sys={%lu.%06lu}, mono={%lu.%06lu}: " fmt "\n", \ - tv.tv_sec, tv.tv_usec, ts.tv_sec, ts.tv_nsec/1000, ##args); \ + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec, \ + (unsigned int long) ts.tv_sec, ts.tv_nsec/1000, ##args); \ } while (0)
static void clock_override_enable(bool enable)