]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix patch for FTBFS on hurd. Thanks to Petter Reinholdtsen for the bug report and...
authorDr. Tobias Quathamer <toddy@debian.org>
Mon, 18 Jul 2016 16:10:51 +0000 (18:10 +0200)
committerDr. Tobias Quathamer <toddy@debian.org>
Mon, 18 Jul 2016 16:10:51 +0000 (18:10 +0200)
debian/changelog
debian/patches/hurd_file_name_support

index 914e918606808bcf89cee92e1145c66e0fd7b54d..80133788999af53e76e69a738dae3b8cb460b5c0 100644 (file)
@@ -10,6 +10,8 @@ lilypond (2.19.45-1~exp1) experimental; urgency=medium
     - Add patch to support guile-2.0
     - Add guile-2.0 and font-texgyre to Build-Depends
     - Enable guile-2.0 in debian/rules
+  * Fix patch for FTBFS on hurd. Thanks to Petter Reinholdtsen for
+    the bug report and patch. (Closes: #761036)
 
  -- Don Armstrong <don@debian.org>  Mon, 01 Dec 2014 15:01:50 -0800
 
index fd98c38189314fc8076377341d24103e5a4ace7d..1a8493486eb7e2858d2640dee588bdb9d7799b32 100644 (file)
@@ -4,12 +4,15 @@ Origin: vendor
 Author: Don Armstrong <don@debian.org>
 --- a/flower/file-name.cc
 +++ b/flower/file-name.cc
-@@ -77,9 +77,13 @@
+@@ -77,9 +77,16 @@
  string
  get_working_directory ()
  {
-+#ifdef _GNU_SOURCE_
-+  return string (get_current_dir_name());
++#ifdef _GNU_SOURCE
++  char *cwd = get_current_dir_name();
++  string scwd(cwd);
++  free(cwd);
++  return scwd;
 +#else
    char cwd[PATH_MAX];
    // getcwd returns NULL upon a failure, contents of cwd would be undefined!
@@ -18,3 +21,34 @@ Author: Don Armstrong <don@debian.org>
  }
  
  /* Join components to full file_name. */
+--- a/flower/test-file-path.cc
++++ b/flower/test-file-path.cc
+@@ -6,12 +6,26 @@
+ #include "yaffut.hh"
+ #include "config.hh"
++string
++get_working_directory ()
++{
++#ifdef _GNU_SOURCE
++  char *cwd = get_current_dir_name();
++  string scwd(cwd);
++  free(cwd);
++  return scwd;
++#else
++  char cwd[PATH_MAX];
++  // getcwd returns NULL upon a failure, contents of cwd would be undefined!
++  return string (getcwd (cwd, PATH_MAX));
++#endif
++}
++
+ TEST (File_path, Find)
+ {
+   char const *extensions[] = {"ly", "", 0};
+   string file = "init";
+-  char cwd[PATH_MAX];
+-  if (!getcwd (cwd, PATH_MAX))
++  if (get_working_directory().empty())
+     {
+       cerr << "Could not get current work directory\n";
+       exit (1);