Browse Source

Fix getopt usage

Christoph Biedl 7 years ago
parent
commit
d1a853a44c
2 changed files with 20 additions and 0 deletions
  1. 19 0
      debian/patches/fix-getopt-usage.patch
  2. 1 0
      debian/patches/series

+ 19 - 0
debian/patches/fix-getopt-usage.patch

@@ -0,0 +1,19 @@
+Description: Fix command line parser for archs where char is unsigned
+Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Bug: https://bitbucket.org/ripencc/bgpdump/issues/36/
+Last-Update: 2016-07-22
+
+     Else the getopt return code check will always fail on archs where
+     the char type is unsigned (e.g. armhf, powerpc).
+
+--- a/bgpdump.c
++++ b/bgpdump.c
+@@ -137,7 +137,7 @@
+ 
+ int main(int argc, char *argv[]) {
+     
+-    char c;
++    int c;
+     int fd;
+     bool usage_error = false;
+     bool use_syslog = true;

+ 1 - 0
debian/patches/series

@@ -13,6 +13,7 @@ clarify-pointer-cast.patch
 fix-gzfile-type-usage.patch
 fix-sprintf-append.patch
 use-strlcat.patch
+fix-getopt-usage.patch
 
 # features
 increase-max-prefixes.patch