diff -urN jed-0.99-19/configure jed-0.99-19-haiku/configure
--- jed-0.99-19/configure	2009-12-14 02:12:55.051118080 +0000
+++ jed-0.99-19-haiku/configure	2010-08-27 06:26:06.645922816 +0000
@@ -5320,6 +5320,7 @@
     ;;
   *haiku* )
     M_LIB=""
+    LIBS = "-lnetwork"
     DYNAMIC_LINK_FLAGS="-Wl,-export-dynamic"
     ELF_CC="\$(CC)"
     ELF_CFLAGS="\$(CFLAGS) -fPIC"
diff -urN jed-0.99-19/src/Makefile.in jed-0.99-19-haiku/src/Makefile.in
--- jed-0.99-19/src/Makefile.in	2009-12-14 02:12:55.029622272 +0000
+++ jed-0.99-19-haiku/src/Makefile.in	2010-08-27 14:56:57.164888576 +0000
@@ -91,7 +91,7 @@
 DL_LIB		= @DYNAMIC_LINK_LIB@
 
 # Anything else???
-OTHERLIBS = @LIBS@ -lm
+OTHERLIBS = @LIBS@ @M_LIB@
 
 #---------------------------------------------------------------------------
 # There should be no need to modify anything below here.
@@ -240,7 +240,7 @@
 #
 install_bin: install_bin_directories
 	$(INSTALL) $(OBJDIR)/jed $(DEST_BIN_DIR)/
-	-cd $(DEST_BIN_DIR); ln -s jed jed-script
+	-cd $(DEST_BIN_DIR); ln -s -f jed jed-script
 	-$(INSTALL) $(OBJDIR)/xjed $(DEST_BIN_DIR)/
 	if test -r $(OBJDIR)/getmail; \
 	then \
diff -urN jed-0.99-19/src/pty.c jed-0.99-19-haiku/src/pty.c
--- jed-0.99-19/src/pty.c	2009-12-14 02:12:55.064225280 +0000
+++ jed-0.99-19-haiku/src/pty.c	2010-08-27 06:01:46.000000000 +0000
@@ -19,7 +19,7 @@
 #include <errno.h>
 
 #ifdef HAVE_GRANTPT
-# if !defined (__linux__) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && !defined(_AIX)
+# if !defined (__linux__) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && !defined(_AIX) && !defined(__HAIKU__)
 #  define USE_SYSV_PTYS
 #  include <sys/types.h>
 #  include <stropts.h>
