diff --git a/lib/opencl_boinc.cpp b/lib/opencl_boinc.cpp
index c4d0982ccd..bb828a4d07 100644
--- a/lib/opencl_boinc.cpp
+++ b/lib/opencl_boinc.cpp
@@ -48,7 +48,7 @@ void OPENCL_DEVICE_PROP::write_xml(MIOFILE& f, const char* tag, bool temp_file)
" <%s>\n"
" %s\n"
" %s\n"
- " %lu\n"
+ " %u\n"
" %d\n"
" %llu\n"
" %llu\n"
@@ -58,8 +58,8 @@ void OPENCL_DEVICE_PROP::write_xml(MIOFILE& f, const char* tag, bool temp_file)
" %s\n"
" %llu\n"
" %llu\n"
- " %lu\n"
- " %lu\n"
+ " %u\n"
+ " %u\n"
" %s\n"
" %s\n"
" %s\n",