summaryrefslogtreecommitdiffstats
path: root/lib/System/Unix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/System/Unix')
-rw-r--r--lib/System/Unix/Memory.inc2
-rw-r--r--lib/System/Unix/Process.inc4
-rw-r--r--lib/System/Unix/Signals.inc2
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/System/Unix/Memory.inc b/lib/System/Unix/Memory.inc
index a80f56f..1b038f9 100644
--- a/lib/System/Unix/Memory.inc
+++ b/lib/System/Unix/Memory.inc
@@ -12,7 +12,7 @@
//===----------------------------------------------------------------------===//
#include "Unix.h"
-#include "llvm/Support/DataTypes.h"
+#include "llvm/System/DataTypes.h"
#include "llvm/System/Process.h"
#ifdef HAVE_SYS_MMAN_H
diff --git a/lib/System/Unix/Process.inc b/lib/System/Unix/Process.inc
index 94e4c1b..911b8c3 100644
--- a/lib/System/Unix/Process.inc
+++ b/lib/System/Unix/Process.inc
@@ -18,7 +18,9 @@
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
-#ifdef HAVE_MALLOC_H
+// DragonFly BSD has deprecated <malloc.h> for <stdlib.h> instead,
+// Unix.h includes this for us already.
+#if defined(HAVE_MALLOC_H) && !defined(__DragonFly__)
#include <malloc.h>
#endif
#ifdef HAVE_MALLOC_MALLOC_H
diff --git a/lib/System/Unix/Signals.inc b/lib/System/Unix/Signals.inc
index d39e1e9..676e1e5 100644
--- a/lib/System/Unix/Signals.inc
+++ b/lib/System/Unix/Signals.inc
@@ -209,7 +209,7 @@ static void PrintStackTrace(void *) {
Dl_info dlinfo;
dladdr(StackTrace[i], &dlinfo);
- fprintf(stderr, "%-3d", i);
+ fprintf(stderr, "%-2d", i);
const char* name = strrchr(dlinfo.dli_fname, '/');
if (name == NULL) fprintf(stderr, " %-*s", width, dlinfo.dli_fname);
OpenPOWER on IntegriCloud