void-packages/srcpkgs/wireshark/patches/HAVE_C99_VSNPRINTF.patch

36 lines
1.1 KiB
Diff

--- a/ConfigureChecks.cmake 2021-12-29 13:12:48.000000000 -0600
+++ b/ConfigureChecks.cmake 2022-01-06 06:45:07.907628761 -0600
@@ -104,32 +104,6 @@
check_symbol_exists(tzname "time.h" HAVE_TZNAME)
#
-# Check if the libc vsnprintf() conforms to C99. If this fails we may
-# need to fall-back on GLib I/O.
-#
-check_c_source_runs("
- #include <stdio.h>
- int main(void)
- {
- /* Check that snprintf() and vsnprintf() don't return
- * -1 if the buffer is too small. C99 says this value
- * is the length that would be written not including
- * the nul byte. */
- char buf[3];
- return snprintf(buf, sizeof(buf), \"%s\", \"ABCDEF\") > 0 ? 0 : 1;
- }"
- HAVE_C99_VSNPRINTF
-)
-if (NOT HAVE_C99_VSNPRINTF)
- message(FATAL_ERROR
-"Building Wireshark requires a C99 compliant vsnprintf() and this \
-target does not meet that requirement. Compiling for ${CMAKE_SYSTEM} \
-using ${CMAKE_C_COMPILER_ID}. Please report this issue to the Wireshark \
-developers at wireshark-dev@wireshark.org."
- )
-endif()
-
-#
# *If* we found libnl, check if we can use nl80211 stuff with it.
#
if (NL_FOUND)