Skip to content

Commit

Permalink
patch configure to link -lpthread on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanf committed Oct 12, 2024
1 parent 176cd41 commit aefbe2e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
25 changes: 25 additions & 0 deletions recipe/0001-add-lpthread-on-windows.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 471e22d6bab682a11b39eb0a68197e620f271e4c Mon Sep 17 00:00:00 2001
From: Brendan Furneaux <[email protected]>
Date: Sat, 12 Oct 2024 11:18:49 +0200
Subject: [PATCH] add -lpthread on windows

---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 4566d1b..07ed73d 100755
--- a/configure
+++ b/configure
@@ -97,7 +97,7 @@ if [ -n "$WINDOWS" ]; then
OBJECTS="${OBJECTS} arch/windows/wmi.o"

LIBRARIES="psapi kernel32 advapi32 shell32 netapi32 iphlpapi wtsapi32"
- LIBRARIES="${LIBRARIES} ws2_32 PowrProf Pdh"
+ LIBRARIES="${LIBRARIES} ws2_32 PowrProf Pdh pthreads"

TARGETS=interrupt

--
2.34.1

2 changes: 2 additions & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ source:
- {{ cran_mirror }}/src/contrib/ps_{{ version }}.tar.gz
- {{ cran_mirror }}/src/contrib/Archive/ps/ps_{{ version }}.tar.gz
sha256: 64d566d23de4b22e0042325bdbf0934468bb910fb23c87353a2d3a9b40530a8e
patch: 0001-add-lpthread-on-windows.patch

build:
number: 0
Expand Down Expand Up @@ -38,6 +39,7 @@ requirements:
- r-base
run:
- r-base
- {{native}}winpthreads-git # [win]

test:
commands:
Expand Down

0 comments on commit aefbe2e

Please sign in to comment.