summaryrefslogtreecommitdiffstats
path: root/sys-apps/kbd/files/kbd-1.13-dont-use-error.patch
blob: d8e0bb1c0e005931cc7479936d4a980968c03a9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
dont use GNU-specific function error()

--- openvt/openvt.c
+++ openvt/openvt.c
@@ -107,8 +107,10 @@
 
     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");
+	if (fstat(i, &st) == -1 && open("/dev/null", O_RDWR) == -1) {
+		perror("open(/dev/null/) failed");
+		return EXIT_FAILURE;
+	}
     }
 
    consfd = getfd(NULL);