anvil-editor: init at 0.4
[NixPkgs.git] / pkgs / misc / drivers / epkowa / sscanf.patch
blob7bee9cae5180b3a31a445b40a9293118671227cf
1 The "%as" verb requests sscanf to allocate a buffer for us. However,
2 this use of 'a' has been long deprecated, and gcc doesn't support it
3 in this manner when using -std=c99. The modern replacement is "%ms".
5 Without this change, iscan couldn't read the interpreter file, in turn
6 breaking all scanners that require plugins.
7 --- backend/cfg-obj.c.orig 2020-03-19 01:27:17.254762077 +0100
8 +++ backend/cfg-obj.c 2020-03-19 02:01:52.293329873 +0100
9 @@ -1026,7 +1026,7 @@
10 char *vendor = NULL;
11 char *model = NULL;
13 - sscanf (string, "%*s %as %as", &vendor, &model);
14 + sscanf (string, "%*s %ms %ms", &vendor, &model);
16 if (list_append (_cfg->seen[CFG_KEY_SCSI], info))
18 @@ -1108,10 +1112,10 @@
19 char *library = NULL;
20 char *firmware = NULL;
22 - sscanf (string, "%*s %*s %x %x %as %as",
23 + sscanf (string, "%*s %*s %x %x %ms %ms",
24 &vendor, &product, &library, &firmware);
26 if (library && _cfg_have_interpreter (library, firmware)
27 && list_append (_cfg->seen[CFG_KEY_INTERPRETER], info))