summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmb <smb@pkgsrc.org>2006-07-11 16:35:24 +0000
committersmb <smb@pkgsrc.org>2006-07-11 16:35:24 +0000
commitba149b5ca3655807cb6d2c1db97b401b9a410b68 (patch)
tree5acf442a108b10d336a0db4d5e820396f985b878
parent19f3110cab601de8a105e0e1f0f5601f74511b43 (diff)
downloadpkgsrc-ba149b5ca3655807cb6d2c1db97b401b9a410b68.tar.gz
Change incorrect use of usleep() to use nanosleep() instead
-rw-r--r--misc/watch/Makefile3
-rw-r--r--misc/watch/distinfo3
-rw-r--r--misc/watch/patches/patch-ab31
3 files changed, 35 insertions, 2 deletions
diff --git a/misc/watch/Makefile b/misc/watch/Makefile
index 0f1962a8356..f5a334b89e9 100644
--- a/misc/watch/Makefile
+++ b/misc/watch/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.6 2006/05/15 16:01:03 tron Exp $
+# $NetBSD: Makefile,v 1.7 2006/07/11 16:35:24 smb Exp $
DISTNAME= procps-3.2.6
+PKGREVISION= 1
PKGNAME= ${DISTNAME:S/procps/watch/}
CATEGORIES= misc
MASTER_SITES= http://procps.sourceforge.net/
diff --git a/misc/watch/distinfo b/misc/watch/distinfo
index 2b02a3e0a78..e6d8ec755f8 100644
--- a/misc/watch/distinfo
+++ b/misc/watch/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.4 2006/05/15 16:01:03 tron Exp $
+$NetBSD: distinfo,v 1.5 2006/07/11 16:35:24 smb Exp $
SHA1 (procps-3.2.6.tar.gz) = 91f44180eb50a94eb945c2598c0e849879e65893
RMD160 (procps-3.2.6.tar.gz) = f0b09701ce48d9f6db1cbb209b02ba026ee58d09
Size (procps-3.2.6.tar.gz) = 279084 bytes
SHA1 (patch-aa) = 953dcd9c3287fec91ac7c585ad9dff4b7ec50cf7
+SHA1 (patch-ab) = 221f49cd4dd29f6ac0b647b8d03eed281b95a667
diff --git a/misc/watch/patches/patch-ab b/misc/watch/patches/patch-ab
new file mode 100644
index 00000000000..5286b95b6fd
--- /dev/null
+++ b/misc/watch/patches/patch-ab
@@ -0,0 +1,31 @@
+$NetBSD: patch-ab,v 1.1 2006/07/11 16:35:24 smb Exp $
+
+--- watch.c.orig 2006-07-09 20:58:47.000000000 -0400
++++ watch.c 2006-07-09 21:01:56.000000000 -0400
+@@ -142,6 +142,7 @@
+ option_differences_cumulative = 0,
+ option_help = 0, option_version = 0;
+ float interval = 2;
++ struct timespec tsinterval;
+ char *command;
+ int command_length = 0; /* not including final \0 */
+
+@@ -201,6 +202,9 @@
+ if (optind >= argc)
+ do_usage();
+
++ tsinterval.tv_sec = interval;
++ tsinterval.tv_nsec = (interval - tsinterval.tv_sec) * 1000000000L;
++
+ command = strdup(argv[optind++]);
+ command_length = strlen(command);
+ for (; optind < argc; optind++) {
+@@ -315,7 +319,7 @@
+
+ first_screen = 0;
+ refresh();
+- usleep(interval * 1000000);
++ nanosleep(&tsinterval, NULL);
+ }
+
+ endwin();