[SCM] libquicktime/master: debian/patches/11-path_max.patch

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Mon May 21 17:53:57 UTC 2012


The following commit has been merged in the master branch:
commit dced3573f99f35d256f7f1b3b1e503e7bf5d4098
Author: Alessio Treglia <alessio at debian.org>
Date:   Mon May 21 19:34:25 2012 +0200

    debian/patches/11-path_max.patch
    
    - utils/rechunk.c:
      + Don't use getline() unconditionally as it needs GNU extensions.

diff --git a/debian/patches/11-path_max.patch b/debian/patches/11-path_max.patch
index 679bc97..bc9ef43 100644
--- a/debian/patches/11-path_max.patch
+++ b/debian/patches/11-path_max.patch
@@ -1,11 +1,13 @@
 Description: Avoid the use of PATH_MAX to allow building quicktime on hurd.
 Author: Cyril Roelandt <tipecaml at gmail.com>
 Bug-Debian: http://bugs.debian.org/670338
+Reviewed-by: Alessio Treglia <alessio at debian.org>
+Last-Update: 2012-05-21
 Forwarded: Burkhard Plaum <plaum at ipf.uni-stuttgart.de>
 ---
  src/lqt_codecinfo.c |   13 ++++++++++---
- utils/rechunk.c     |    9 +++++++--
- 2 files changed, 17 insertions(+), 5 deletions(-)
+ utils/rechunk.c     |   17 +++++++++++++++++
+ 2 files changed, 27 insertions(+), 3 deletions(-)
 
 --- libquicktime.orig/src/lqt_codecinfo.c
 +++ libquicktime/src/lqt_codecinfo.c
@@ -45,41 +47,51 @@ Forwarded: Burkhard Plaum <plaum at ipf.uni-stuttgart.de>
      strcat(filename, directory_entry->d_name);
 --- libquicktime.orig/utils/rechunk.c
 +++ libquicktime/utils/rechunk.c
-@@ -46,7 +46,7 @@ static char ** add_frames_from_file(char
+@@ -46,7 +46,11 @@ static char ** add_frames_from_file(char
    {
    FILE * input;
    char * pos;
--  char filename[PATH_MAX+10];
++#ifdef PATH_MAX
+   char filename[PATH_MAX+10];
++#else
 +  char *filename = NULL;
++#endif
  
    input = fopen(list_filename, "r");
    if(!input)
-@@ -56,7 +56,7 @@ static char ** add_frames_from_file(char
+@@ -56,7 +60,11 @@ static char ** add_frames_from_file(char
      return (char**)0;
      }
  
--  while(fgets(filename, PATH_MAX+10, input))
++#ifdef PATH_MAX
+   while(fgets(filename, PATH_MAX+10, input))
++#else
 +  while(getline(&filename, NULL, input) != -1)
++#endif
      {
      /* Delete trailing '\n' and '\r' */
  
-@@ -72,7 +72,10 @@ static char ** add_frames_from_file(char
+@@ -72,7 +80,12 @@ static char ** add_frames_from_file(char
          break;
  
        if(pos == filename)
 +        {
++#ifndef PATH_MAX
 +        free(filename);
++#endif
          return input_frames;
 +        }
        
        pos--;      
        }
-@@ -83,6 +86,8 @@ static char ** add_frames_from_file(char
+@@ -83,6 +96,10 @@ static char ** add_frames_from_file(char
      input_frames = realloc(input_frames, sizeof(char*) * *total_input_frames);
      input_frames[*total_input_frames - 1] = strdup(filename);
      //    fprintf(stderr, "Adding file %s\n", input_frames[*total_input_frames - 1]);
++#ifndef PATH_MAX
 +    free(filename);
 +    filename = NULL;
++#endif
      }
    return input_frames;
    }

-- 
libquicktime packaging



More information about the pkg-multimedia-commits mailing list