Summary:ASTERISK-03734: OpenBSD fails compile
Reporter:John Todd (jtodd)Labels:
Date Opened:2005-03-22 00:19:30.000-0600Date Closed:2008-01-15 15:28:16.000-0600
Versions:Frequency of
Description:Recent additions seem to have broken the compiles for OpenBSD (i386) compiles.  I am running 3.6 "out of the box" with the normal list of libraries and inclusions.


gmake[1]: `libdb1.a' is up to date.
gmake[1]: Leaving directory `/root/builds/asterisk/asterisk/db1-ast'
gmake[1]: Entering directory `/root/builds/asterisk/asterisk/stdtime'
gmake[1]: `libtime.a' is up to date.
gmake[1]: Leaving directory `/root/builds/asterisk/asterisk/stdtime'
gcc -pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g  -Iinclude -I../include -D_REENTRANT -D_GNU_SOURCE  -O6 -march=i386   -pthread   -DASTERISK_VERSION=\"CVS-HEAD-03/22/05-06:14:46\" -DASTERISK_VERSION_NUM=999999 -DINSTALL_PREFIX=\"\" -DASTETCDIR=\"/etc/asterisk\" -DASTLIBDIR=\"/usr/lib/asterisk\" -DASTVARLIBDIR=\"/var/lib/asterisk\" -DASTVARRUNDIR=\"/var/run\" -DASTSPOOLDIR=\"/var/spool/asterisk\" -DASTLOGDIR=\"/var/log/asterisk\" -DASTCONFPATH=\"/etc/asterisk/asterisk.conf\" -DASTMODDIR=\"/usr/lib/asterisk/modules\" -DASTAGIDIR=\"/var/lib/asterisk/agi-bin\"     -DBUSYDETECT_MARTIN     -fomit-frame-pointer    -c -o channel.o channel.c
In file included from include/asterisk/translate.h:24,
                from channel.c:32:
include/asterisk/plc.h:41: stdint.h: No such file or directory
gmake: *** [channel.o] Error 1
Comments:By: John Todd (jtodd) 2005-03-22 00:28:03.000-0600

It may be the case that this is a similar bug, and perhaps has a similar solution:

By: Mark Spencer (markster) 2005-03-22 01:02:18.000-0600

Does removing the stdint.h requirement make it compile?

By: Olle Johansson (oej) 2005-03-22 01:08:29.000-0600

Check the __FreeBSD__ option in plc.h and add an OpenBSD flag to it. In freeBSD we include inttypes.h instead of stdint.h. If this works, please add a note here.

Also check plc.c for INT16_MAX and see if you have any include file that defines that. Otherwise, it's defined for you in there.

The asterisk-bsd list is useful for BSD related problems :-)

By: John Todd (jtodd) 2005-03-22 12:34:17.000-0600

Yes, yes, yes.  It was late, I was tired.  Here's the patch that makes everything happy.  I suppose that the NetBSD people will also want their stuff defined in here, but I didn't patch for that since I don't have a test environment...

--- plc.h~      Tue Mar 22 18:28:22 2005
+++ plc.h       Tue Mar 22 18:28:22 2005
@@ -35,7 +35,7 @@
#ifdef SOLARIS
#include <sys/int_types.h>
-#ifdef __FreeBSD__
+#if defined(__OpenBSD__) || defined(__FreeBSD__)
#include <inttypes.h>
#include <stdint.h>

By: Digium Subversion (svnbot) 2008-01-15 15:28:16.000-0600

Repository: asterisk
Revision: 5230

U   trunk/include/asterisk/plc.h

r5230 | markster | 2008-01-15 15:28:15 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix OpenBSD compile (bug ASTERISK-3734)