Skip to content

Commit

Permalink
pothos: fix the build against poco-1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
dwt committed Feb 21, 2025
1 parent 4a1a105 commit dbe5797
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
50 changes: 50 additions & 0 deletions pkgs/applications/radio/pothos/cstring.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Submodule blocks contains modified content
diff --git a/blocks/file/BinaryFileSink.cpp b/blocks/file/BinaryFileSink.cpp
index 31c9a41..0083b0d 100644
--- a/blocks/file/BinaryFileSink.cpp
+++ b/blocks/file/BinaryFileSink.cpp
@@ -13,6 +13,7 @@
#endif //_MSC_VER
#include <stdio.h>
#include <cerrno>
+#include <cstring>

#ifndef O_BINARY
#define O_BINARY 0
diff --git a/blocks/file/BinaryFileSource.cpp b/blocks/file/BinaryFileSource.cpp
index 0151231..379d383 100644
--- a/blocks/file/BinaryFileSource.cpp
+++ b/blocks/file/BinaryFileSource.cpp
@@ -13,6 +13,7 @@
#endif //_MSC_VER
#include <stdio.h>
#include <cerrno>
+#include <cstring>

#ifndef O_BINARY
#define O_BINARY 0
diff --git a/blocks/file/TextFileSink.cpp b/blocks/file/TextFileSink.cpp
index b4b2f08..2be66e2 100644
--- a/blocks/file/TextFileSink.cpp
+++ b/blocks/file/TextFileSink.cpp
@@ -6,6 +6,7 @@
#include <complex>
#include <fstream>
#include <cerrno>
+#include <cstring>

/***********************************************************************
* |PothosDoc Text File Sink
Submodule soapy contains modified content
diff --git a/soapy/DemoController.cpp b/soapy/DemoController.cpp
index 4ce8ead..9a4e742 100644
--- a/soapy/DemoController.cpp
+++ b/soapy/DemoController.cpp
@@ -6,6 +6,7 @@
#include <iostream>
#include <chrono>
#include <algorithm> //min/max
+#include <cstring>

/***********************************************************************
* |PothosDoc SDR Demo Controller
8 changes: 8 additions & 0 deletions pkgs/applications/radio/pothos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
alsa-lib,
muparserx,
python3,
utf8proc,
}:

mkDerivation rec {
Expand All @@ -41,8 +42,14 @@ mkDerivation rec {
url = "https://github.com/pothosware/PothosCore/commit/092d1209b0fd0aa8a1733706c994fa95e66fd017.patch";
hash = "sha256-bZXG8kD4+1LgDV8viZrJ/DMjg8UvW7b5keJQDXurfkA=";
})
# various source files are missing imports of <cstring>
# https://github.com/pothosware/PothosBlocks/issues/80
./cstring.patch
];

# poco 1.14 requires c++17
NIX_CFLAGS_COMPILE = [ "-std=gnu++17" ];

nativeBuildInputs = [
cmake
pkg-config
Expand All @@ -62,6 +69,7 @@ mkDerivation rec {
alsa-lib
muparserx
python3
utf8proc
];

postInstall = ''
Expand Down

0 comments on commit dbe5797

Please sign in to comment.