Permalink
Browse files

Fix compilation problems on FreeBSD 6.4. Fixes issue #766.

  • Loading branch information...
1 parent 4914f93 commit 5b42439f816450d023f7b9800ec4ef092602beeb @FooBarWidget FooBarWidget committed Jun 1, 2012
Showing with 16 additions and 5 deletions.
  1. +1 −0 NEWS
  2. +15 −5 ext/common/AgentBase.cpp
View
@@ -1,6 +1,7 @@
Release 3.0.13
--------------
+ * Fixed compilation problems on FreeBSD 6.4. Fixes issue #766.
* Fixed compilation problems on GCC >= 4.6.
* Fixed compilation problems on OpenIndiana and Solaris 11. Fixes issue #742.
@@ -188,18 +188,28 @@ appendSignalReason(char *buf, siginfo_t *info) {
switch (info->si_signo) {
case SIGSEGV:
switch (info->si_code) {
- SI_CODE_HANDLER(SEGV_MAPERR);
- SI_CODE_HANDLER(SEGV_ACCERR);
+ #ifdef SEGV_MAPERR
+ SI_CODE_HANDLER(SEGV_MAPERR);
+ #endif
+ #ifdef SEGV_ACCERR
+ SI_CODE_HANDLER(SEGV_ACCERR);
+ #endif
default:
handled = false;
break;
}
break;
case SIGBUS:
switch (info->si_code) {
- SI_CODE_HANDLER(BUS_ADRALN);
- SI_CODE_HANDLER(BUS_ADRERR);
- SI_CODE_HANDLER(BUS_OBJERR);
+ #ifdef BUS_ADRALN
+ SI_CODE_HANDLER(BUS_ADRALN);
+ #endif
+ #ifdef BUS_ADRERR
+ SI_CODE_HANDLER(BUS_ADRERR);
+ #endif
+ #ifdef BUS_OBJERR
+ SI_CODE_HANDLER(BUS_OBJERR);
+ #endif
default:
handled = false;
break;

0 comments on commit 5b42439

Please sign in to comment.