If we're not on Windows, use clock_gettime(CLOCK_REALTIME) *if* we have
it; otherwise, fall back on gettimeofday().
(Note: neither Linux, nor macOS, nor Windows necessarily "have"
particular APIs; particular *versions* of Linux distributions
(kernel+libc) have them, particular *versions* of macOS have them, and
particular *versions* of Windows+MSVC have them.
And Linux, Windows and macOS aren't the only platforms on which we run.)
Fixes#17101.
(cherry picked from commit ca99a821b4)
In uninstall_autoconf, when running uninstall subfunctions, pass the
arguments to the subfunctions.
When uninstalling Ninja, remove the "we've finished installing this"
indicator file.
Get rid of a debugging "set +x".
(cherry picked from commit 9fbf79c045)
For a CMake build done in a subdirectory of the source directory, the
equivalent of "make distclean" is "rm -rf {that subdirectory}". Make it
so.
When uninstalling the stuff snappy installs with "rm -rf", use $DO_RM,
so it's done with sudo iff /usr/local isn't writable by us, just as
"make uninstall" is done with $DO_MAKE_UNINSTALL so it's done with sudo
iff /usr/local isn't writable by us.
Fix up the list of what to remove, now that we're building snappy as a
shared library, so that it removes shared libraries rather than the
non-existent static library.
Update a comment while we're at it, as Lua isn't the only dependency
that doesn't support "make uninstall".
(cherry picked from commit 7d01e3a74e)
The older versions of snappy apparently used autotools and build a
shared library by default; for example, Wireshark 3.2.6 for macOS is
built with snappy, and includes a snappy dynamic library in the app
bundle.
The current version uses CMake and does *not* build a shared library by
default. Instead, it builds a static library, which, when you try to
link it to a C-only shared library...
...does not work.
The linker sees that you're statically linking in a bunch of C++ .o
files and gets upset because it can't find C++ standard library routines
used by that code.
If it's a dynamic library, the library was itself already linked with
the C++ standard library, so the external references to that library
from the snappy library are already marked as having been resolved to
the extent that they're expected to be in the C++ standard library at
run time - and, when the dynamic snappy library is built, it's marked as
depending on the C++ standard library, so the run time linker will, when
it loads the snappy dynamic library, see that the C++ standard library
is required and will load it if it hasn't already been loaded.
(cherry picked from commit e92119c608)
Or a distclean target, for that matter.
Do the best we can.
(libpcap and tcpdump support both autotools and CMake, and Wireshark
uses only CMake; all of them support an uninstall target in CMake. Go
forth, read what they did, and sin no more.)
(cherry picked from commit 504f2ea42a)
GNU libtool has a libtool program and a libtoolize program.
The development tools for NeXTStEP, apparently, had a libtool program as
well, and the current version of the development tools for the current
version of NeXTStEP, generally known as "Xcode for macOS", still have
that program.
This means that we do some renaming after installing GNU libtool, so
that its "libtool" becomes "glibtool" and its "libtoolize" becomes
"glibtoolize".
That meant we had to compensate for that when running autoreconf when
building and installing minizip.
It turns out we have to do that when running autogen.sh when building
and installing GLib as well.
(cherry picked from commit 2ecb606142)
Enable PKCS #11 support in macOS builds with macos-setup.sh (already
supported on macOS via Homebrew and on all other OSes with GnuTLS 3.4
or greater) by installing p11-kit (and its dependency libtasn1) and
building nettle and GnuTLS against it.
(cherry picked from commit fe1f947540)
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
(backported from commit 77e9d7d3f9)
These are the versions being used to build 3.4, so we're updating this
so that the 3.4 source tree's macos-setup.sh can be used to set up the
build environment for 3.4.
[skip ci]
When a Segment Routing Header is present in the IPv6 packet provisions
have to be made to setup the right destination address for the pseudo
header used in checksum calculations. When segments are left in the header
the first address in the list has to replace the destination address.
Closes#17097
(cherry picked from commit 7052994a19)
It's minizip-$installed_minizip_version-done, not
zlib-$installed_minizip_version-done; the tarball is
zlib-$installed_minizip_version.tar.gz, because it's a contributed file
in the zlib package, but we don't use zlib in the name of the -done
file.
[skip ci]
(cherry picked from commit 0cdbdcc5a4)
It has no configure script, so there's no need for "make distclean", and
the Makefile supplied with it has no "make distclean" rule; just do
"make clean".
[skip ci]
(cherry picked from commit 806f524a10)
We can't determine the version number, as there's nothing in the header
to indicate the version with which we were compiled, nor is there an API
to determine the version with which we're running.
(cherry picked from commit 6498bde741)
Big Sur goes to 11, and it appears that next year's (San Juan Capistrano?)
will go to 12, and so on.
Split version numbers into major and minor, and do version-number
comparison (alas, whilst CMake has that built in, the Bourne shell
doesn't, and neither does the Bourne-again shell).
This should fix issue #17043.
(cherry picked from commit 8e2815bfc0)
In uninstall_autoconf, when running uninstall subfunctions, pass the
arguments to the subfunctions.
When uninstalling Ninja, remove the "we've finished installing this"
indicator file.
Get rid of a debugging "set +x".
(cherry picked from commit 9fbf79c045)
Fix/update/expand some comments.
Do uninstalls for dependencies using CMake more similarly.
For LZ4, as it comes with a Makefile rather than any
autotools/CMake/etc. configuration, "make distclean" might not be
necessary, so, as it's not supported, just do "make clean".
For libssh, do all removes in the uninstall in a single command, and use
$DO_RM, so that it uses sudo iff /usr/local isn't writable by us. In
addition, remove the build directory as the equivalent of "make
distclean".
As with libssh, so with brotli.
(backported from commit 02c5f50009)
Make sure NSView.wantsLayer is true by setting QT_MAC_WANTS_LAYER=1 at
startup if we're running on Big Sur and we were built with a version of
Qt susceptible to QTBUG-87014. Fixes#17075?
(cherry picked from commit d4b40c0047)
Two interlocking problems cause the dissection of FC to fail in some cases,
as shown in the capture of the related issue.
The FC dissector assumes that ETHERTYPE_UNK in the data structure passed
to it is coming from the MDS header dissector only, and thus that header
sizes have to be taken into account. This is not / no longer the case.
It always passes down ETHERTYPE_FCFT. Therefore the MDS header size
checking does not apply to ETHERTYP_UNK, so is removed as condition.
The other FC related dissectors were forced to setup a data structure to
pass to FC for it to handle that part of the frame. Because these weren't
related to ethernet, these lazily set the ethertype field in the data
structure to 0. This unfortunately matches ETHERTYPE_UNK, triggering the
MDS header size checking in FC, leading to this issue. With the first
problem resolved, now make it explicit that unknown ethertype is indicated
by ETHERTYPE_UNK, not '0'.
Addresses primary part of issue #17084
(cherry picked from commit 3f0fc1b232)
When the user enters row to SNMP Users table in wireshark and Authentication model is set to MD5, row is ignored in processing. The reason is that constant for MD5 is 0, but the code checks if the value is defined by simple 'usm_p.user_assoc' condition. Therefore 0 never succeeds.
As item can have only listed values, I think the check can be removed.
Function verified on sample.
I propose to cherry pick the change to all stable branches.
(cherry picked from commit 7f376c7ced)
We must be able to correctly detect valid coalesced packets and
recognize them from random padding.
Close#17011Close#16914
(cherry picked from commit 0af60377b4)