Bug 2252276

Summary: units: configure scripts needs C compatibility fixes
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: unitsAssignee: Florian Weimer <fweimer>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: jamacku, kdudka, svashisht
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: units-2.22-7.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-30 15:06:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2141798    
Attachments:
Description Flags
units-configure-c99.patch none

Description Florian Weimer 2023-11-30 14:55:32 UTC
It calls mbsrtowcs with an incorrect parameter type:

int
main ()
{
wchar_t *out;char *in;char *res;
     res=setlocale(LC_CTYPE,"");res=in;
     mbsrtowcs(out, &res, 2, NULL);
     wcswidth(out,2);
  ;
  return 0;
}

The type of res should be const char *, not char *.

Reproducible: Always

Comment 1 Florian Weimer 2023-11-30 14:57:41 UTC
Filing this here because upstream does not seem to have a public bug tracker.

Comment 2 Florian Weimer 2023-11-30 14:58:26 UTC
Created attachment 2002135 [details]
units-configure-c99.patch

Comment 3 Florian Weimer 2023-11-30 15:06:18 UTC
Also mailed the patch to the upstream author.

Comment 4 Jan Macku 2023-12-01 08:56:30 UTC
Thank you Florian, for handling this Bug.