build: Fix function detection when using -Werror=return-type
Recent versions of openSUSE default to using -Werror=return-type for package builds, which results in all of these function checks incorrectly detecting the function as not being available.
Co-authored-by: Peng Yi
Resolves: #4 (closed)