Wireshark 3.4.0: build failure on older MacOS releases, due to 'CLOCK_REALTIME'
The MacPorts project builds Wireshark3 for a large swath of MacOS releases, from Big Sur all the way back to 10.6. And we've encountered build failures on MacOS releases prior to 10.12, involving the use of
CLOCK_REALTIME isn't available in those older MacOS releases. However, there is a simple workaround; see patch, below.
Steps to reproduce
Build on any MacOS release earlier than 10.12.
What is the current bug behavior?
Build fails on file
ui/qt/import_text_dialog.cpp, with the following error:
wireshark-3.4.0/ui/qt/import_text_dialog.cpp:388:27: error: use of undeclared identifier 'CLOCK_REALTIME' clock_gettime(CLOCK_REALTIME, &timenow); /* supported by Linux and MacOS */
What is the expected correct behavior?
Build should succeed. Proposed fix is attached, as a unified diff patch.
Sample capture file
Relevant logs and/or screenshots