pkgsrc/www/firefox68/patches/patch-toolkit_components_terminator_nsTerminator.cpp
ryoon ebc9069030 www/firefox68: import firefox68-68.1.0
Mozilla Firefox is a free, open-source and cross-platform web browser
for Windows, Linux, MacOS X and many other operating systems.

It is fast and easy to use, and offers many advantages over other web
browsers, such as tabbed browsing and the ability to block pop-up
windows.

Firefox also offers excellent bookmark and history management, and it
can be extended by developers using industry standards such as XML,
CSS, JavaScript, C++, etc. Many extensions are available.

This package provides Firefox 68 ESR.
2019-09-21 07:31:43 +00:00

27 lines
730 B
C++

$NetBSD: patch-toolkit_components_terminator_nsTerminator.cpp,v 1.1 2019/09/21 07:31:44 ryoon Exp $
* Fix segfault on exit under NetBSD
--- toolkit/components/terminator/nsTerminator.cpp.orig 2019-03-07 16:53:45.000000000 +0000
+++ toolkit/components/terminator/nsTerminator.cpp
@@ -36,7 +36,7 @@
#if defined(XP_WIN)
# include <windows.h>
#else
-# include <unistd.h>
+# include <time.h>
#endif
#include "mozilla/ArrayUtils.h"
@@ -170,7 +170,10 @@ void RunWatchdog(void* arg) {
#if defined(XP_WIN)
Sleep(1000 /* ms */);
#else
- usleep(1000000 /* usec */);
+ struct timespec tickd;
+ tickd.tv_sec = 1;
+ tickd.tv_nsec = 0;
+ nanosleep(&tickd, NULL);
#endif
if (gHeartbeat++ < timeToLive) {