Fixed compile time warning by adding upstream patches