--- a/pthread_once.c
+++ b/pthread_once.c
@@ -54,7 +54,7 @@
       return EINVAL;
     }
   
-  if (!PTW32_INTERLOCKED_EXCHANGE_ADD((LPLONG)&once_control->done, 0)) /* MBR fence */
+  if (!PTW32_INTERLOCKED_EXCHANGE_ADD((LPLONG)&once_control->done, (size_t)0)) /* MBR fence */
     {
       ptw32_mcs_local_node_t node;