Using #if instead of #ifdef was causing some issues when cross-compiling, like: ../ext/curl/gstcurlsmtpsink.c:54:5: error: "HAVE_SYS_SOCKET_H" is not defined, evaluates to 0 [-Werror=undef] 54 | #if HAVE_SYS_SOCKET_H Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8589>