summaryrefslogtreecommitdiff
blob: eb8cba069da06ce4c46de4fd2ba78121ba5fe877 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
dont use GNU-specific function error()

--- openvt/openvt.c
+++ openvt/openvt.c
@@ -108,7 +108,8 @@
     for (i=0; i<3; i++) {
 	struct stat st;
 	if (fstat(i, &st) == -1 && open("/dev/null", O_RDWR) == -1)
-		error(EXIT_FAILURE, errno, "open");
+		perror("open(/dev/null/) failed");
+		return EXIT_FAILURE;
     }
 
    consfd = getfd(NULL);