Subject: apcaccess: Variable for getopt should be int Description: ch is used to store the return of getopt, which is an int, not a char This fix allows apcaccess to run on platforms with unsigned chars again. Origin: local --- apcupsd-3.14.12~/src/apcaccess.c 2015-04-06 17:20:12.098287353 +0200 +++ apcupsd-3.14.12/src/apcaccess.c 2015-04-06 17:19:07.778287365 +0200 @@ -146,10 +146,10 @@ #endif // Process standard options - char ch; - while ((ch = getopt(argc, argv, "f:h:p:u")) != -1) + int opt; + while ((opt = getopt(argc, argv, "f:h:p:u")) != -1) { - switch (ch) + switch (opt) { case 'f': cfgfile = optarg;