diff --git a/repos/base/include/drivers/timer/util.h b/repos/base/include/drivers/timer/util.h index 48c74a7dc1..190eac3778 100644 --- a/repos/base/include/drivers/timer/util.h +++ b/repos/base/include/drivers/timer/util.h @@ -40,8 +40,8 @@ namespace Genode { { enum:RESULT_T { HALF_WIDTH = (sizeof(RESULT_T) << 2), - MSB_MASK = ((RESULT_T)~0UL) << HALF_WIDTH, - LSB_MASK = ((RESULT_T)~0UL) >> HALF_WIDTH, + MSB_MASK = (~(RESULT_T)0) << HALF_WIDTH, + LSB_MASK = (~(RESULT_T)0) >> HALF_WIDTH, MSB_RSHIFT = 10, LSB_LSHIFT = HALF_WIDTH - MSB_RSHIFT, };