aboutsummaryrefslogtreecommitdiff
path: root/miscutils/taskset.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/taskset.c')
-rw-r--r--miscutils/taskset.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/miscutils/taskset.c b/miscutils/taskset.c
index 708abd9f2..973f94ac3 100644
--- a/miscutils/taskset.c
+++ b/miscutils/taskset.c
@@ -35,7 +35,8 @@ static char *__from_cpuset(cpu_set_t *mask)
#define TASKSET_PRINTF_MASK "%x"
/* (void*) cast is for battling gcc: */
/* "dereferencing type-punned pointer will break strict-aliasing rules" */
-#define from_cpuset(mask) (*(unsigned*)(void*)&(mask))
+#define from_cpuset(mask) ({ void *__vp = &(mask); *(unsigned*)__vp; })
+/* gcc 4.3.0 still complains: #define from_cpuset(mask) (*(unsigned*)(void*)&(mask)) */
#endif