[PATCH 3.18.y] Fix compilation error backporting upstream commit 9fc12023d6f5