--- xmotd-1.17.3b.orig/logo.c
+++ xmotd-1.17.3b/logo.c
@@ -29,6 +29,7 @@
 
 /* $Id: logo.c,v 1.2 1997/07/18 01:23:55 elf Exp $ */
 #include <stdio.h>
+#include <stdlib.h>
 #include <X11/Intrinsic.h>
 #include <X11/StringDefs.h>
 
--- xmotd-1.17.3b.orig/xmotd.8
+++ xmotd-1.17.3b/xmotd.8
@@ -5,17 +5,17 @@
 VT100, etc.)
 
 .SH SYNOPSIS
-.B /usr/local/bin/xmotd 
+.B /usr/bin/xmotd 
 [\fBX-toolkit options\fP] [\fBxmotd-options\fP] \fIfile\fP
 [\fIfile2\fP ... ]
 
-.B /usr/local/bin/xmotd 
+.B /usr/bin/xmotd 
 [\fBX-toolkit options\fP] [\fBxmotd-options\fP] \fIdirectory\fP
 
 .PP
 or (in text-mode)
 
-.B /usr/local/bin/xmotd
+.B /usr/bin/xmotd
 [\fB-stampfile\fP \fIstamp-file\fP] [\fB-wakeup\fP \fIsleep-period\fP]
 \fIfile\fP [\fIfile2\fP ...]
 
@@ -64,9 +64,11 @@
 file in cases where they can also login via dialup.
 
 .LP
+This version of
 .B xmotd
-can display messages marked-up with HTML and xpm colour pixmap
-logos. Support for these must be configured at compile-time.
+cannot display messages marked-up with HTML and xpm colour pixmap
+logos, because the code that provided that functionality does not
+comply with Debian Free Software Guidelines.
 
 .SH OPERATION
 .LP
@@ -151,13 +153,6 @@
 NOTES for additional details.
 
 .TP 8
-.BI \-browser " web-browser"
-
-specifies the path and filename of a web-browser to be used when an
-URL is clicked (HTML version only). By default, \fIweb-browser\fP is
-\fI"/usr/local/bin/netscape"\fP. See NOTES for additional details.
-
-.TP 8
 .BI \-help
 
 displays command-line options usage.
@@ -297,7 +292,7 @@
 
 .nf
 
-    /usr/local/bin/xmotd -always \\
+    /usr/bin/xmotd -always \\
         -xrm "*title.label: Top 10 Disk Hogs\\n As of midnight\\n " \\
         -xrm "*title.foreground: yellow" \\
         -xrm "*form.background: red" \\
@@ -458,26 +453,6 @@
 indication that the user has logged out because \fBTakeConsole\fP has
 changed ownership of the console.
 
-The \fB-browser\fP option was originally called \fB-netscape\fP; it
-was renamed to be more generic. When initially run, the browser is
-invoked as:
-
-.nf
-    /usr/local/bin/netscape %s
-
-.fi
-
-where \fB%s\fP is replaced by the selected URL. Subsequent URLs will
-be displayed in the already running browser using the syntax:
-
-.nf
-    /usr/local/bin/netscape -remote openURL(%s)
-
-.fi
-
-You may substitute a browser of your choice for \fBnetscape\fP, if it
-supports this syntax.
-
 .SH BUGS
 
 There are no provisions for displaying embedded images in the HTML
--- xmotd-1.17.3b.orig/xmotd.c
+++ xmotd-1.17.3b/xmotd.c
@@ -28,6 +28,7 @@
  * 
  */
 #include <stdio.h>
+#include <stdlib.h>
 #include <malloc.h>
 #include <time.h>
 #include <memory.h>
--- xmotd-1.17.3b.orig/textmode.c
+++ xmotd-1.17.3b/textmode.c
@@ -30,9 +30,12 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <malloc.h>
 #include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
 #include <memory.h>
 #include <fcntl.h>
 
--- xmotd-1.17.3b.orig/main.c
+++ xmotd-1.17.3b/main.c
@@ -44,8 +44,10 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <malloc.h>
 #include <time.h>
+#include <unistd.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
--- xmotd-1.17.3b.orig/browser.c
+++ xmotd-1.17.3b/browser.c
@@ -32,6 +32,8 @@
 
 #ifdef HAVE_HTML
 
+#include <sys/types.h>
+#include <unistd.h>
 #include <stdio.h>
 #include "maindefs.h"
 #include "libhtmlw/HTML.h"
--- xmotd-1.17.3b.orig/usage.c
+++ xmotd-1.17.3b/usage.c
@@ -27,6 +27,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 
 #include "maindefs.h"
 #include "patchlevel.h"
--- xmotd-1.17.3b.orig/Imakefile
+++ xmotd-1.17.3b/Imakefile
@@ -22,7 +22,7 @@
 
 XCOMM If you wish to use colour xpm pixmaps for the icon and have the
 XCOMM Xpm library installed, then uncomment the following line: 
-XCOMM #define HAVE_XPM
+#define HAVE_XPM
 
 XCOMM If you wish to build with Motif, then uncomment the following line:
 XCOMM #define MOTIF
@@ -76,8 +76,10 @@
 .PRECIOUS: distrib
 
 #ifdef HPArchitecture
+#ifndef LinuxArchitecture
         CCOPTIONS = -Aa -D_HPUX_SOURCE
 #endif
+#endif
 
 #ifdef HAVE_XPM
           XPM_LIB = -lXpm
@@ -109,7 +111,7 @@
 XCOMM This is what the final link looks like:
 XCOMM LOCAL_LIBRARIES = -lXm -lXmu -lXt -lXext -lX11 -lsocket -lgen -lucb  -L/usr/ucblib -R/usr/ucblib -R/usr/X11R6/lib
 
-  LOCAL_LIBRARIES = $(MOTD_LIBRARIES) XawClientLibs
+  LOCAL_LIBRARIES = $(MOTD_LIBRARIES) $(XAWLIB) $(XMULIBONLY) $(XTOOLONLYLIB) $(XONLYLIB)
           DEPLIBS = $(HTML_DEP_LIB) 
 
 ComplexProgramTarget(xmotd)
@@ -133,6 +135,9 @@
 	rm -f xmotd-man.ps;
 	troff -mansun xmotd.8 |dpost >xmotd-mansun.ps
 
+xmotd.man: xmotd.8
+	cp $< $@
+
 XCOMM This target builds the java distribution, Wed Sep 26 19:24:51 2001
 java-distrib:
 	tar zcvf jmotd-0.55.tar.gz jmotd/README jmotd/logo.gif jmotd/xmotd* jmotd/HistoryItem*
