[ros-rospack] 01/02: Add Patch for FTBFS on hurd-i386

Jochen Sprickerhof jspricke at moszumanska.debian.org
Fri Sep 2 08:59:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

jspricke pushed a commit to branch master
in repository ros-rospack.

commit 35a5444cf2f2b9b042fb8fd4429c3e289d94e370
Author: Jochen Sprickerhof <git at jochen.sprickerhof.de>
Date:   Fri Sep 2 10:53:19 2016 +0200

    Add Patch for FTBFS on hurd-i386
    
    Closes: #835627
    Thanks: Svante Signell
---
 ...ce-PATH_MAX-by-getcwd-NULL-0-in-unit-test.patch | 31 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 32 insertions(+)

diff --git a/debian/patches/0007-Replace-PATH_MAX-by-getcwd-NULL-0-in-unit-test.patch b/debian/patches/0007-Replace-PATH_MAX-by-getcwd-NULL-0-in-unit-test.patch
new file mode 100644
index 0000000..0915123
--- /dev/null
+++ b/debian/patches/0007-Replace-PATH_MAX-by-getcwd-NULL-0-in-unit-test.patch
@@ -0,0 +1,31 @@
+From: Svante Signell <svante.signell at gmail.com>
+Date: Fri, 2 Sep 2016 10:51:04 +0200
+Subject: Replace PATH_MAX by getcwd(NULL, 0) in unit test
+
+---
+ test/test/utest.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/test/test/utest.cpp b/test/test/utest.cpp
+index 3f79357..96b1fa0 100644
+--- a/test/test/utest.cpp
++++ b/test/test/utest.cpp
+@@ -231,8 +231,8 @@ int main(int argc, char **argv)
+   char buf[1024];
+   std::string rr = std::string(getcwd(buf, sizeof(buf))) + "/test2";
+   setenv("ROS_PACKAGE_PATH", rr.c_str(), 1);
+-  char path[PATH_MAX];
+-  if(getcwd(path,sizeof(path)))
++  char *path = getcwd(NULL, 0);
++  if(path)
+   {
+     boost::filesystem::path p(path);
+     p = p.parent_path();
+@@ -243,6 +243,7 @@ int main(int argc, char **argv)
+     setenv("PATH", newpath.c_str(), 1);
+   }
+ 
++  free(path);
+   testing::InitGoogleTest(&argc, argv);
+   return RUN_ALL_TESTS();
+ }
diff --git a/debian/patches/series b/debian/patches/series
index 21ed6cd..150adf8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
 0004-Limit-search-depth-for-usr-share.patch
 0005-Fix-FTBFS-on-hurd-i386.patch
 0006-Fix-unit-tests.patch
+0007-Replace-PATH_MAX-by-getcwd-NULL-0-in-unit-test.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ros/ros-rospack.git



More information about the debian-science-commits mailing list