Define HAVE_LIMITS_H in options.h rather than config.h since types.h depends on this definition and config.h isn't consistently available at runtime.

Fixes #9936.
This commit is contained in:
Kareem
2026-03-27 17:01:02 -07:00
parent fdfb0a9fe7
commit a11ab0e46b
3 changed files with 6 additions and 4 deletions
-3
View File
@@ -19,9 +19,6 @@
/* Define to 1 if you have the `gmtime_r' function. */
#cmakedefine HAVE_GMTIME_R @HAVE_GMTIME_R@
/* Define to 1 if you have the <limits.h> header file. */
#cmakedefine HAVE_LIMITS_H @HAVE_LIMITS_H@
/* Define to 1 if you have the <pcap/pcap.h> header file. */
#cmakedefine HAVE_PCAP_PCAP_H @HAVE_PCAP_PCAP_H@
+3
View File
@@ -33,6 +33,9 @@ extern "C" {
#endif
#ifndef WOLFSSL_OPTIONS_IGNORE_SYS
/* Since types.h depends on HAVE_LIMITS_H, we must define it in options.h. */
#undef HAVE_LIMITS_H
#cmakedefine HAVE_LIMITS_H @HAVE_LIMITS_H@
#undef _GNU_SOURCE
#cmakedefine _GNU_SOURCE
#undef _POSIX_THREADS
+3 -1
View File
@@ -204,7 +204,9 @@ then
fi
fi
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stddef.h time.h sys/ioctl.h sys/socket.h sys/time.h errno.h sys/un.h ctype.h sys/random.h])
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stddef.h time.h sys/ioctl.h sys/socket.h sys/time.h errno.h sys/un.h ctype.h sys/random.h])
# Special case: Since types.h depends on HAVE_LIMITS_H, we must define it in options.h.
AC_CHECK_HEADER([limits.h], [AM_CPPFLAGS="$AM_CPPFLAGS -DHAVE_LIMITS_H=1"], [])
AC_CHECK_LIB([network],[socket])
AC_C_BIGENDIAN
AC_C___ATOMIC