39 lines
1.1 KiB
Text
39 lines
1.1 KiB
Text
$NetBSD: patch-bn,v 1.2 2002/12/23 18:28:20 cjep Exp $
|
|
|
|
On NetBSD, comment out call to setgetprogname().
|
|
|
|
--- appl/kalog/kalog.c.orig Tue Aug 20 18:17:04 2002
|
|
+++ appl/kalog/kalog.c Tue Aug 20 18:20:52 2002
|
|
@@ -88,9 +88,19 @@
|
|
const char *cellname;
|
|
const char *user;
|
|
|
|
+/*
|
|
+ * The setprogname(3) function was introduced in NetBSD 1.6.
|
|
+ * It is a function provided for compatibility, and in NetBSD,
|
|
+ * calling setprogname() from main() has no effect.
|
|
+ * In order to for this to work on older NetBSD systems,
|
|
+ * we just comment the call to setprogname() out.
|
|
+ */
|
|
+#if !defined(__NetBSD__)
|
|
setprogname (argv[0]);
|
|
-
|
|
method = log_open (getprogname(), "/dev/stderr:notime");
|
|
+#else
|
|
+ method = log_open ("kalog", "/dev/stderr:notime");
|
|
+#endif
|
|
if (method == NULL)
|
|
errx (1, "log_open failed");
|
|
cell_init(0, method);
|
|
@@ -104,7 +114,11 @@
|
|
parse_user (argv[1], &user, &cellname);
|
|
else {
|
|
fprintf (stderr, "usage: %s [username[@cell]]\n",
|
|
+#if !defined(__NetBSD__)
|
|
getprogname());
|
|
+#else
|
|
+ "kalog");
|
|
+#endif
|
|
exit (1);
|
|
}
|
|
|