Added missing includes.
Showing
1 changed file
with
10 additions
and
8 deletions
... | @@ -16,6 +16,8 @@ You should have received a copy of the GNU General Public License | ... | @@ -16,6 +16,8 @@ You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
18 | 18 | ||
19 | #include <sys/types.h> | ||
20 | #include <sys/time.h> | ||
19 | #include <utmp.h> | 21 | #include <utmp.h> |
20 | #include <fcntl.h> | 22 | #include <fcntl.h> |
21 | #include <unistd.h> | 23 | #include <unistd.h> |
... | @@ -27,6 +29,14 @@ static int fd = -1; | ... | @@ -27,6 +29,14 @@ static int fd = -1; |
27 | static struct utmp ut; | 29 | static struct utmp ut; |
28 | 30 | ||
29 | void | 31 | void |
32 | endutent () | ||
33 | { | ||
34 | if (fd > 0) | ||
35 | close (fd); | ||
36 | fd = -1; | ||
37 | } | ||
38 | |||
39 | void | ||
30 | setutent () | 40 | setutent () |
31 | { | 41 | { |
32 | endutent (); | 42 | endutent (); |
... | @@ -35,14 +45,6 @@ setutent () | ... | @@ -35,14 +45,6 @@ setutent () |
35 | perror ("setutent: Can't open utmp file"); | 45 | perror ("setutent: Can't open utmp file"); |
36 | } | 46 | } |
37 | 47 | ||
38 | void | ||
39 | endutent () | ||
40 | { | ||
41 | if (fd > 0) | ||
42 | close (fd); | ||
43 | fd = -1; | ||
44 | } | ||
45 | |||
46 | struct utmp * | 48 | struct utmp * |
47 | getutent () | 49 | getutent () |
48 | { | 50 | { | ... | ... |
-
Please register or sign in to post a comment