diff options
Diffstat (limited to 'contrib/ntp/sntp/m4/ntp_af_unspec.m4')
-rw-r--r-- | contrib/ntp/sntp/m4/ntp_af_unspec.m4 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/contrib/ntp/sntp/m4/ntp_af_unspec.m4 b/contrib/ntp/sntp/m4/ntp_af_unspec.m4 new file mode 100644 index 000000000000..cdb453d6d106 --- /dev/null +++ b/contrib/ntp/sntp/m4/ntp_af_unspec.m4 @@ -0,0 +1,23 @@ +dnl ###################################################################### +dnl AF_UNSPEC checks +AC_DEFUN([NTP_AF_UNSPEC], [ + +# We could do a cv check here, but is it worth it? + +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ + #include <sys/socket.h> + #ifndef AF_UNSPEC + #include "Bletch: AF_UNSPEC is undefined!" + #endif + #if AF_UNSPEC != 0 + #include "Bletch: AF_UNSPEC != 0" + #endif + ]], + [AC_MSG_NOTICE([AF_UNSPEC is zero, as expected.])], + [AC_MSG_ERROR([AF_UNSPEC is not zero on this platform!])] + )] +)]) + +dnl ###################################################################### |