Make asterisk compile on non-amd64 versions of OpenBSD.
authorMichiel van Baak <michiel@vanbaak.info>
Mon, 19 Jan 2009 18:36:24 +0000 (18:36 +0000)
committerMichiel van Baak <michiel@vanbaak.info>
Mon, 19 Jan 2009 18:36:24 +0000 (18:36 +0000)
The HW_PHYSMEM64 is only available in latest OpenBSD and/or amd64 versions of OpenBSD.
Use HW_PHYSMEM when HW_PHYSMEM64 is not available.

(closes issue #14129)
Reported by: ys
Patches:
      2009011600_physmem64.diff.txt uploaded by mvanbaak (license 7)
Tested by: mvanbaak, jtodd

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169327 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/asterisk.c

index 20d845d..f3c7fca 100644 (file)
@@ -587,7 +587,7 @@ static char *handle_show_sysinfo(struct ast_cli_entry *e, int cmd, struct ast_cl
        uptime = uptime/3600;
        /* grab total physical memory  */
        mib[0] = CTL_HW;
-#if defined(__OpenBSD__)
+#if defined(HW_PHYSMEM64)
        mib[1] = HW_PHYSMEM64;
 #else
        mib[1] = HW_PHYSMEM;