summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid CARLIER <devnexen@gmail.com>2019-10-31 15:11:23 +0000
committerDave Watson <dade.watson@gmail.com>2019-10-31 08:11:23 -0700
commit9f6d037f1feadb22c324110b5b589f4358049f65 (patch)
treed3f1f3f7fd6762e73ddfb7beeeb4dbd8a649ab83
parenta36ec8cfdb8764e4f8bf6b16a149a60ea6ad038d (diff)
downloadlibunwind-9f6d037f1feadb22c324110b5b589f4358049f65.tar.gz
Little FreeBSD build fix (#135)
-rw-r--r--src/mi/backtrace.c4
-rw-r--r--src/x86_64/Ginit.c4
-rw-r--r--tests/forker.c1
3 files changed, 4 insertions, 5 deletions
diff --git a/src/mi/backtrace.c b/src/mi/backtrace.c
index c7aa2bdc..08e12c92 100644
--- a/src/mi/backtrace.c
+++ b/src/mi/backtrace.c
@@ -23,9 +23,9 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-#ifndef UNW_REMOTE_ONLY
-
+#if !defined(UNW_REMOTE_ONLY) && !defined(UNW_LOCAL_ONLY)
#define UNW_LOCAL_ONLY
+
#include <libunwind.h>
#include <libunwind_i.h>
#include <string.h>
diff --git a/src/x86_64/Ginit.c b/src/x86_64/Ginit.c
index 63a53907..535a455a 100644
--- a/src/x86_64/Ginit.c
+++ b/src/x86_64/Ginit.c
@@ -164,7 +164,7 @@ static int mincore_validate (void *addr, size_t len)
/* mincore could fail with EAGAIN but we conservatively return -1
instead of looping. */
- if (mincore (addr, len, mvec) != 0)
+ if (mincore (addr, len, (char *)mvec) != 0)
{
return -1;
}
@@ -187,7 +187,7 @@ tdep_init_mem_validate (void)
unw_word_t addr = PAGE_START((unw_word_t)&present);
unsigned char mvec[1];
int ret;
- while ((ret = mincore ((void*)addr, PAGE_SIZE, mvec)) == -1 &&
+ while ((ret = mincore ((void*)addr, PAGE_SIZE, (char *)mvec)) == -1 &&
errno == EAGAIN) {}
if (ret == 0)
{
diff --git a/tests/forker.c b/tests/forker.c
index c91fc3f3..b03f86a7 100644
--- a/tests/forker.c
+++ b/tests/forker.c
@@ -24,7 +24,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <alloca.h>
#include <sys/time.h>
#include <sys/types.h>