Patches to R10B-3 to facilitate builds on OpenBSD 3.7

Geoff White <>
Wed Mar 23 17:27:13 CET 2005


The following patches are needed to get Erlang R10B-3 to build and 
install on OpenBSD 3.7-current.
I hope that the Erlang developers can vet these patches and get them 
into the next release, especially the memsup.c patch.  I've created a 
"port" for OpenBSd but this patch has been outstanding for a couple of 
patch releases against R10B. If you don't like this patch, fine but at 
least do something to fix it.



Essential patch to memsup.c to allow the build to complete...
----------------------------------------------------------------------------
--- lib/os_mon/c_src/memsup.c.orig      Wed Oct  2 14:16:37 2002
+++ lib/os_mon/c_src/memsup.c   Sun Mar 13 01:44:20 2005
@@ -95,7 +95,11 @@
 #ifdef BSD4_4
 #include <sys/types.h>
 #include <sys/sysctl.h>
-#include <vm/vm_param.h>
+#ifdef __OpenBSD__
+#include <sys/vmmeter.h>
+#else
+#include <vm/vm_param.h>
+#endif
 #ifdef __FreeBSD__
 #include <sys/vmmeter.h>
 #endif

------------------------------------------------------------------------


(Essential) Allows the man pages to be properly built and installed 
under openBSD...
----------------------------------------------------------------------------
--- erts/etc/unix/format_man_pages.orig Mon Sep 20 14:09:14 1999
+++ erts/etc/unix/format_man_pages      Sun Mar 13 01:54:41 2005
@@ -29,6 +29,8 @@ case $SYS:$REL in
                        TARGET=sunos5 ;;
                Linux:*)
                        TARGET=linux ;;
+               OpenBSD:3.*)
+                       TARGET=openbsd ;;
                *)
                        TARGET="" ;;
 esac
@@ -106,6 +108,8 @@ then
 else
     if [ -f "/vmunix" ]; then
        CATMAN=/usr/etc/catman
+    elif [ "$TARGET" = "openbsd" ]; then
+       CATMAN=/usr/sbin/catman
     else
        CATMAN=/usr/bin/catman
     fi
---------------------------------------------------------------------------------
(optional) this prevents blow up if the path to perl involves "/" when a 
"fake" install is happening.
----------------------------------------------------------------------------------
--- lib/snmp/mibs/Makefile.in.orig      Fri Oct  1 04:54:31 2004
+++ lib/snmp/mibs/Makefile.in   Sun Mar 13 22:07:36 2005
@@ -121,7 +121,7 @@ OTP_MIBDIR = $(shell if test -d ../../ot
 debug opt: $(TARGET_FILES)
 
 $(ERL_TOP)/lib/snmp/bin/snmp-v2tov1: 
$(ERL_TOP)/lib/snmp/bin/snmp-v2tov1.src
-       $(PERL) -p -e 's/%PERL%/$(PERL)/ ' < $< > $@
+       $(PERL) -p -e 's?%PERL%?$(PERL)? ' < $< > $@
        chmod 755 $@
 
 $(SNMP_BIN_TARGET_DIR)/OTP-REG.bin:    
$(ERL_TOP)/lib/$(OTP_MIBDIR)/mibs/OTP-RE
G.mib
-----------------------------------------------------------




More information about the erlang-patches mailing list