From 31f957034a5f23eafcb47aa7a2d54e3a03de1b4d Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Sun, 14 Mar 2010 13:04:09 +0000 Subject: [PATCH] Make it compile on LP64 arches. MFC after: 3 days --- tools/regression/posixsem/posixsem.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/regression/posixsem/posixsem.c b/tools/regression/posixsem/posixsem.c index 465d6e7f26df..6401b5cb46b5 100644 --- a/tools/regression/posixsem/posixsem.c +++ b/tools/regression/posixsem/posixsem.c @@ -1239,7 +1239,8 @@ exhaust_unnamed_sems(void) return; } - if (child_worker(exhaust_unnamed_child, (void *)nsems_max, &stat)) + if (child_worker(exhaust_unnamed_child, (void *)(uintptr_t)nsems_max, + &stat)) return; errno = CSTAT_ERROR(stat); switch (CSTAT_CLASS(stat)) { @@ -1293,7 +1294,8 @@ exhaust_named_sems(void) return; } - if (child_worker(exhaust_named_child, (void *)nsems_max, &stat) < 0) + if (child_worker(exhaust_named_child, (void *)(uintptr_t)nsems_max, + &stat) < 0) return; errno = CSTAT_ERROR(stat); switch (CSTAT_CLASS(stat)) { @@ -1351,7 +1353,8 @@ fdlimit_unnamed_sems(void) int nsems_max, stat; nsems_max = 10; - if (child_worker(fdlimit_unnamed_child, (void *)nsems_max, &stat)) + if (child_worker(fdlimit_unnamed_child, (void *)(uintptr_t)nsems_max, + &stat)) return; errno = CSTAT_ERROR(stat); switch (CSTAT_CLASS(stat)) { @@ -1395,7 +1398,8 @@ fdlimit_named_sems(void) int i, nsems_max, stat; nsems_max = 10; - if (child_worker(fdlimit_named_child, (void *)nsems_max, &stat) < 0) + if (child_worker(fdlimit_named_child, (void *)(uintptr_t)nsems_max, + &stat) < 0) return; errno = CSTAT_ERROR(stat); switch (CSTAT_CLASS(stat)) {