Package: lpr
Version: 1:2008.05.17
Severity: important
Tags: patch
User: debian-...@lists.debian.org
Usertags: kfreebsd
Hi,
the current version fails to build on GNU/kFreeBSD.
It needs small tweaks, see attached patch.
Thanks in advance
Petr
diff -ur lpr/common_source/lp.h b/common_source/lp.h
--- lpr/common_source/lp.h 2005-01-29 04:40:20.000000000 +0000
+++ b/common_source/lp.h 2009-09-01 12:10:11.000000000 +0000
@@ -37,6 +37,15 @@
#include <signal.h>
#include <grp.h>
+
+#if !defined(LOGIN_NAME_MAX) && defined(MAXLOGNAME)
+#define LOGIN_NAME_MAX MAXLOGNAME
+#endif
+
+#ifndef N_TTY
+#define N_TTY TTYDISC
+#endif
+
/*
* Global definitions for the line printer system.
*/
diff -ur lpr/lpd/modes.c b/lpd/modes.c
--- lpr/lpd/modes.c 2005-01-29 04:40:20.000000000 +0000
+++ b/lpd/modes.c 2009-09-01 12:09:24.000000000 +0000
@@ -106,8 +106,10 @@
{ "-igncr", 0, IGNCR },
{ "icrnl", ICRNL, 0 },
{ "-icrnl", 0, ICRNL },
+#ifdef IUCLC
{ "iuclc", IUCLC, 0 },
{ "-iuclc", 0, IUCLC },
+#endif
{ "ixon", IXON, 0 },
{ "-ixon", 0, IXON },
{ "flow", IXON, 0 },
@@ -168,8 +170,10 @@
{ "-crt", ECHOK, ECHOE|ECHOKE|ECHOCTL },
{ "newcrt", ECHOE|ECHOKE|ECHOCTL, ECHOK|ECHOPRT },
{ "-newcrt", ECHOK, ECHOE|ECHOKE|ECHOCTL },
+#ifdef XCASE
{ "xcase", XCASE, 0 },
{ "-xcase", 0, XCASE },
+#endif
{ NULL },
};
@@ -180,8 +184,10 @@
{ "-litout", OPOST, 0 },
{ "ocrnl", OCRNL, 0 },
{ "-ocrnl", 0, OCRNL },
+#ifdef OLCUC
{ "olcuc", OLCUC, 0 },
{ "-olcuc", 0, OLCUC },
+#endif
{ "onlcr", ONLCR, 0 },
{ "-onlcr", 0, ONLCR },
{ "onlret", ONLRET, 0 },