--- ui/qt/import_text_dialog.cpp	2020-12-20 11:02:56.000000000 -0500
+++ ui/qt/import_text_dialog.cpp	2020-12-15 16:53:01.000000000 -0500
@@ -11,6 +11,11 @@
 
 #include <time.h>
 
+#ifdef __MACH__
+#include <mach/clock.h>
+#include <mach/mach.h>
+#endif
+
 #include "import_text_dialog.h"
 
 #include "wiretap/wtap.h"
@@ -384,6 +389,15 @@
 
 #ifdef _WIN32
             timespec_get(&timenow, TIME_UTC); /* supported by Linux and Windows */
+#elif defined(__MACH__)
+            // OS X does not have clock_gettime, use clock_get_time
+            clock_serv_t cclock;
+            mach_timespec_t mts;
+            host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
+            clock_get_time(cclock, &mts);
+            mach_port_deallocate(mach_task_self(), cclock);
+            timenow.tv_sec = mts.tv_sec;
+            timenow.tv_nsec = mts.tv_nsec;
 #else
             clock_gettime(CLOCK_REALTIME, &timenow); /* supported by Linux and MacOS */
 #endif
