Revert "Revert "Fixed clang build error for libgui""

This reverts commit 54335bab0310dbe585f4f1a863b2751a4b38a565.