Bug 725483

Summary: keyutils-1.5.1-1.fc16 fails to build on s390
Product: [Fedora] Fedora Reporter: Dan Horák <dan>
Component: keyutilsAssignee: David Howells <dhowells>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dhowells
Target Milestone: ---   
Target Release: ---   
Hardware: s390   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-22 07:49:09 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 467765    
Description Flags
proposed fix none

Description Dan Horák 2011-07-25 11:30:21 EDT
Created attachment 515099 [details]
proposed fix

keyutils-1.5.1-1.fc16 fails to build on s390 (32bit) because of a combination -Werror and size_t being defined as unsigned long, please see build.log at
Comment 1 David Howells 2011-07-25 11:50:16 EDT
request-key.c: In function 'execute_program':
request-key.c:583:4: error: format '%zd' expects argument of type 'signed size_t', but argument 2 has type 'int' [-Werror=format]
request-key.c: In function 'pipe_to_program':
request-key.c:841:2: error: format '%zd' expects argument of type 'signed size_t', but argument 2 has type 'int' [-Werror=format]

That's the result of a pointer subtraction.  I wonder if it behaves differently on S390 to other arches as the pointer size (31 bits) is not the same as the size of long/size_t (32 bits).
Comment 2 David Howells 2011-07-25 11:52:25 EDT
I should probably be using the 't' modifier rather than the 'z' modifier to "%d" in the printf arguments for this.
Comment 3 Dan Horák 2011-07-25 12:08:33 EDT
Ha, the 't' modifier seems to do the trick.
Comment 4 David Howells 2011-07-26 06:00:36 EDT
I've checked in my suggested change.
Comment 5 David Howells 2011-08-15 10:26:45 EDT
Did that fix it for you?
Comment 6 Dan Horák 2011-08-15 10:35:13 EDT
yes, keyutils-1.5.2-1.fc16 builds fine on Fedora/s390x (http://s390.koji.fedoraproject.org/koji/buildinfo?buildID=73846)