summaryrefslogtreecommitdiff
path: root/fstests/timertest.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-02-26 04:14:34 +0000
committerRoland McGrath <roland@gnu.org>2001-02-26 04:14:34 +0000
commit9912022fe2134b1254f3e3035da540571dee32bd (patch)
treea68d2b9e0c6058499661db6b2819921ad42e9139 /fstests/timertest.c
parent187a4a912e814c0d9b05cbdca58979534b29d389 (diff)
2001-02-25 Roland McGrath <roland@frob.com>
* timertest.c: Include <stdlib.h> for decl.
Diffstat (limited to 'fstests/timertest.c')
-rw-r--r--fstests/timertest.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fstests/timertest.c b/fstests/timertest.c
index 3c011fd9..a2c8a7da 100644
--- a/fstests/timertest.c
+++ b/fstests/timertest.c
@@ -1,5 +1,5 @@
-/*
- Copyright (C) 1994 Free Software Foundation
+/*
+ Copyright (C) 1994, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -18,6 +18,7 @@
#include <signal.h>
#include <sys/time.h>
#include <stdio.h>
+#include <stdlib.h>
void
alarm_handler (int signo)
@@ -35,9 +36,9 @@ main()
real_timer.it_interval.tv_sec = 1;
real_timer.it_value.tv_usec = 0;
real_timer.it_value.tv_sec = 1;
-
+
signal (SIGALRM, alarm_handler);
-
+
if (setitimer (ITIMER_REAL, &real_timer, 0) < 0)
{
perror ("Setting timer");
@@ -65,4 +66,3 @@ main()
printf ("Saw %.3o\n", c);
}
}
-