]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Make filebundling code work with gcc 4.5 and older.
authorAdam Sutton <dev@adamsutton.me.uk>
Fri, 14 Sep 2012 10:55:20 +0000 (11:55 +0100)
committerAdam Sutton <dev@adamsutton.me.uk>
Fri, 14 Sep 2012 11:14:40 +0000 (12:14 +0100)
src/filebundle.h
support/mkbundle

index d25ca8339a95c48af772ac0567075dd49b69302d..0063234345b88135b2d7f63afcc6195f4b32e8e1 100644 (file)
@@ -42,8 +42,9 @@ enum filebundle_type
 /* File bundle entry */
 typedef struct filebundle_entry
 {
-  enum filebundle_type type;
-  const char          *name;
+  enum filebundle_type     type;
+  const char              *name;
+  struct filebundle_entry *next;
   union {
     struct {
       size_t count;
@@ -55,7 +56,6 @@ typedef struct filebundle_entry
       ssize_t orig;
     } f;
   };
-  struct filebundle_entry *next;
 } filebundle_entry_t;
 
 /* File bundle directory entry */
index 68741008e514e055509718e51bc928c6ba61de0b..9bc114d01c91695235d883aff2a55e8dcf266d9c 100755 (executable)
@@ -90,9 +90,11 @@ def output_file ( path, name, idx, next = -1 ):
   print >>outf, '  .type    = FB_FILE,'
   print >>outf, '  .name    = "%s",'  % name
   print >>outf, '  .next    = %s,' % n
-  print >>outf, '  .f.size  = %d,' % len(d)
-  print >>outf, '  .f.orig  = %d,' % o
-  print >>outf, '  .f.data  = filebundle_data_%06d,' % idx
+  print >>outf, '  {'
+  print >>outf, '    .f.size  = %d,' % len(d)
+  print >>outf, '    .f.orig  = %d,' % o
+  print >>outf, '    .f.data  = filebundle_data_%06d' % idx
+  print >>outf, '  },'
   print >>outf, '};'
   print >>outf, ''
 
@@ -106,8 +108,10 @@ def output_dir ( path, name, idx, child, count, next = -1 ):
   print >>outf, '  .type    = FB_DIR,'
   print >>outf, '  .name    = "%s",'  % name
   print >>outf, '  .next    = %s,' % n
-  print >>outf, '  .d.count = %d,' % count
-  print >>outf, '  .d.child = &filebundle_entry_%06d,' % child
+  print >>outf, '  {'
+  print >>outf, '    .d.count = %d,' % count
+  print >>outf, '    .d.child = &filebundle_entry_%06d' % child
+  print >>outf, '  },'
   print >>outf, '};'
   print >>outf, ''