[Asterisk-Users] openbsd compilation fails for recent checkout of v1-0_stable

Tor Houghton torh at bogus.net
Mon May 17 07:45:30 MST 2004


This has been mentioned before on this list, but in order for md5.c to
compile successfully (OpenBSD 3.3), the following must change in md5.c:

	#if defined( __FreeBSD__ ) || defined( __OpenBSD__ )
	#  include <sys/endian.h>

Change this to be:

	#if defined( __FreeBSD__ ) || defined( __OpenBSD__ )
	#  include <machine/types.h>
	#  include <machine/endian.h>

And -E is an invalid linker option, so the Makefile needs to be changed:

	ifeq (${OSARCH},Darwin)
	OBJS+=poll.o dlfcn.o
	ASTLINK=-Wl,-dynamic
	SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
	+else
	+ifeq (${OSARCH},OpenBSD)
	+ASTLINK=-Wl
	+SOLINK=-shared -Xlinker -x
	else
	ASTLINK=-Wl,-E
	SOLINK=-shared -Xlinker -x
	endif             
	+endif

Also, for OpenBSD, asterisk's use of gethostbyname_r doesn't work out of the
box, so needs to follow FreeBSD's fixi, by changing the

	#if defined(__FreeBSD__)

to
	#if defined(__FreeBSD__) || defined (__OpenBSD__)	

Also, it is likely that PROC needs to be set manually for your architecture
in the top level Makefile.

Thanks,

Tor



More information about the asterisk-users mailing list