-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix build on alpha and x32 architectures #634
Conversation
Signed-off-by: Mathias Gibbens <[email protected]>
#elif defined(__x86_64__) && defined(__ILP32__) | ||
ErrMsgPrintf(errmsg, | ||
"unsupported file system: %llx", | ||
fs_info.f_type); | ||
#else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this part be fixed by casting fs_info.f_type
to a sufficiently wide type instead? Would prefer to avoid the ifdefs if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From statfs(2)
:
The
__fsword_t
type used for various fields in thestatfs
structure definition is a glibc internal type, not intended for public use. This leaves the programmer in a bit of a conundrum when trying to copy or compare these fields to local variables in a program. Usingunsigned int
for such variables suffices on most systems.
Casting to an unsigned int
or unsigned long
should work; I copied the ifdefs since there was already one there for s390x.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I hadn't noticed the existing ifdef -- we should remove that too! (No need to do it in this PR.) Casting to unsigned long
would be my preferred approach here.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #634 +/- ##
==========================================
- Coverage 81.21% 81.20% -0.02%
==========================================
Files 192 192
Lines 27061 27062 +1
Branches 4943 4975 +32
==========================================
- Hits 21978 21976 -2
- Misses 3445 3488 +43
+ Partials 1638 1598 -40 ☔ View full report in Codecov by Sentry. |
We also need to you sign the CLA before we can merge this -- sorry for the inconvenience. |
Signed-off-by: Mathias Gibbens <[email protected]>
6dfc04d
to
3822a6d
Compare
There's nothing mentioning that in the repo (for example, in README, LICENSE, or CONTRIBUTING). 😞 I'm not a fan of CLAs, especially for Debian packaging work which is contributed back under a DFSG-compatible license, rendering the CLA unnecessary. |
This is a very good point! I'll fix it.
You have my genuine sympathy here, but we can't do anything about the CLA requirement. If you'd prefer not to sign it then with your blessing I can submit and merge an equivalent PR myself. In either case, I appreciate you contributing this fix! |
Sure, I'm fine with you making an equivalent PR and then closing this one. That's much preferred versus carrying an additional patch for Debian. |
Closing as superseded by #640 |
Fix compile errors on alpha and x32 architectures, as seen on the Debian builders.