Commit bbb99eff bbb99effbfe07b1fd8ac7be9ddf927b803cbe706 by Sergey Poznyakoff

Added missing includes.

1 parent fe6fbfdd
...@@ -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 {
......