pkgsrc/www/firefox52/patches/patch-toolkit_components_terminator_nsTerminator.cpp
ryoon c4d1b3723e Import firefox52-52.1.0 as www/firefox52.
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.
2017-04-27 01:55:57 +00:00

27 lines
717 B
C++

$NetBSD: patch-toolkit_components_terminator_nsTerminator.cpp,v 1.1 2017/04/27 01:55:57 ryoon Exp $
* Fix segfault on exit under NetBSD
--- toolkit/components/terminator/nsTerminator.cpp.orig 2016-06-15 21:54:53.514370128 +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"
@@ -147,7 +147,10 @@ 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) {