diff --git a/src/plugins/value/domains/cvalue/builtins.ml b/src/plugins/value/domains/cvalue/builtins.ml
index 2558f8efefb71f7428c8f15d781296edcaa0858e..f992d2c0885c3703f754a4e23eb3ca7a1b3bb23d 100644
--- a/src/plugins/value/domains/cvalue/builtins.ml
+++ b/src/plugins/value/domains/cvalue/builtins.ml
@@ -129,10 +129,15 @@ let inconsistent_builtin_typ kf = function
     let expected_result, expected_args = typ () in
     match Kernel_function.get_type kf with
     | TFun (result, args, _, _) ->
+      (* If a builtin expects a void pointer, then accept all pointer types. *)
+      let need_cast typ expected =
+        Cil.need_cast typ expected
+        && not (Cil.isVoidPtrType expected && Cil.isPointerType typ)
+      in
       let args = Cil.argsToList args in
-      Cil.need_cast result expected_result
+      need_cast result expected_result
       || List.length args <> List.length expected_args
-      || List.exists2 (fun (_, t, _) u -> Cil.need_cast t u) args expected_args
+      || List.exists2 (fun (_, t, _) u -> need_cast t u) args expected_args
     | _ -> assert false
 
 (* Warns if the builtin [bname] overrides the function definition [kf]. *)