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

This reverts commit fe0a73400f404f1b0ffc295fda8e0a19b22f03c5.