[SCM] nordlicht/master: d/patches: Add 2 upstream patches to fix build on arm*

cinemast-guest at users.alioth.debian.org cinemast-guest at users.alioth.debian.org
Fri Feb 5 09:58:19 UTC 2016


The following commit has been merged in the master branch:
commit a5cadfda2e5be92826cd574431b37475c83cdb59
Author: Peter Spiess-Knafl <dev at spiessknafl.at>
Date:   Fri Feb 5 10:54:45 2016 +0100

    d/patches: Add 2 upstream patches to fix build on arm*

diff --git a/debian/patches/0001-fix-arm.patch b/debian/patches/0001-fix-arm.patch
new file mode 100644
index 0000000..87110a2
--- /dev/null
+++ b/debian/patches/0001-fix-arm.patch
@@ -0,0 +1,31 @@
+From 2e33a667a3b913c9975cb83d1656a6f4b7e74934 Mon Sep 17 00:00:00 2001
+From: Sebastian Morr <sebastian at morr.cc>
+Date: Mon, 1 Feb 2016 19:10:27 +0100
+Subject: poptGetNextOpt returns int, not char. Fixes building on ARM.
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813101
+
+---
+ main.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+--- a/main.c
++++ b/main.c
+@@ -106,13 +106,13 @@
+     const poptContext popt = poptGetContext(NULL, argc, argv, optionsTable, 0);
+     poptSetOtherOptionHelp(popt, "[OPTION]... VIDEOFILE\n\nOptions:");
+ 
+-    char c;
++    int option;
+ 
+-    // The next line leaks 3 bytes, blame popt!
+-    while ((c = poptGetNextOpt(popt)) >= 0) { }
++    // The next line leaks 2 bytes, blame popt!
++    while ((option = poptGetNextOpt(popt)) >= 0) { }
+ 
+-    if (c < -1) {
+-        fprintf(stderr, "nordlicht: %s: %s\n", poptBadOption(popt, POPT_BADOPTION_NOALIAS), poptStrerror(c));
++    if (option < -1) {
++        fprintf(stderr, "nordlicht: %s: %s\n", poptBadOption(popt, POPT_BADOPTION_NOALIAS), poptStrerror(option));
+         return 1;
+     }
+ 
diff --git a/debian/patches/0002-fix-truncate-call.patch b/debian/patches/0002-fix-truncate-call.patch
new file mode 100644
index 0000000..02c0b4c
--- /dev/null
+++ b/debian/patches/0002-fix-truncate-call.patch
@@ -0,0 +1,23 @@
+From 3f77aff91f0c4e4bf2b131b7f8851e389c8cc68b Mon Sep 17 00:00:00 2001
+From: Sebastian Morr <sebastian at morr.cc>
+Date: Mon, 1 Feb 2016 19:20:28 +0100
+Subject: Don't ignore return value of ftruncate
+
+---
+ main.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/main.c
++++ b/main.c
+@@ -225,7 +225,10 @@
+             print_error("Could not open '%s'.", output_file);
+             exit(1);
+         }
+-        ftruncate(fd, nordlicht_buffer_size(n));
++        if (ftruncate(fd, nordlicht_buffer_size(n)) == -1) {
++            print_error("Could not truncate '%s'.", output_file);
++            exit(1);
++        }
+         data = (unsigned char *) mmap(NULL, nordlicht_buffer_size(n), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+         if (data == (void *) -1) {
+             print_error("Could not mmap %d bytes.", nordlicht_buffer_size(n));
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..0bf57ad
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+0001-fix-arm.patch
+0002-fix-truncate-call.patch

-- 
nordlicht packaging



More information about the pkg-multimedia-commits mailing list