Skip to content

Commit

Permalink
Fix coredumper build on aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatenkobrain committed May 18, 2024
1 parent e96d2e3 commit eb6f74f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ ev: libev/libev/.libs/libev.a
coredumper/coredumper/src/libcoredumper.a:
cd coredumper && rm -rf coredumper-*/ || true
cd coredumper && tar -zxf coredumper-*.tar.gz
patch -d coredumper/coredumper -p1 -i ../0001-Include-unistd.h-for-getpid.patch
cd coredumper/coredumper && cmake . -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Debug
cd coredumper/coredumper && CC=${CC} CXX=${CXX} ${MAKE}
coredumper: coredumper/coredumper/src/libcoredumper.a
Expand Down
24 changes: 24 additions & 0 deletions deps/coredumper/0001-Include-unistd.h-for-getpid.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From cb0b6bcde64b3d108f5f9adb429af57890e0bcee Mon Sep 17 00:00:00 2001
From: Igor Raits <igor.raits@gmail.com>
Date: Sat, 18 May 2024 19:57:19 +0200
Subject: [PATCH] Include unistd.h for getpid()

---
src/thread_lister.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/thread_lister.c b/src/thread_lister.c
index 15fedac..48cb4e4 100644
--- a/src/thread_lister.c
+++ b/src/thread_lister.c
@@ -34,6 +34,7 @@
#include "thread_lister.h"

#include <stdio.h> /* needed for NULL on some powerpc platforms (?!) */
+#include <unistd.h> /* getpid() */
#include <sys/prctl.h>

#include "linuxthreads.h"
--
2.45.0

0 comments on commit eb6f74f

Please sign in to comment.