Menu

#38 Compile with musl libc

Unstable (example)
closed-accepted
nobody
None
5
2015-06-14
2015-01-28
Felix Janda
No

Discussion

  • Mark Lord

    Mark Lord - 2015-06-13

    The #include changes have now been applied to my source tree, but I'm not so sure about changing loff_t to off_t. With that change, the size of the type may become too small on a 64-bit machine.

    Can you explain why you want that line to change, and why it doesn't break anything?

    Thanks.

     
  • Felix Janda

    Felix Janda - 2015-06-13

    Thanks for applying the include changes.

    off_t is here 64bit on all systems because _FILE_OFFSET_BITS is set to 64.

    musl needs to be asked more directly to define the legacy loff_t.

    (off_t is always 64bit on 64bit systems. However on some 32bit systems it might only be 32bit if LFS is not enabled, e.g. via _FILE_OFFSET_BITS.)

     
  • Mark Lord

    Mark Lord - 2015-06-13

    I think using off_t instead of the correct loff_t would break 32-bit systems. The kernel always defines loff_t as u64, and the sys_fallocate() syscall needs loff_t for a parameter.

    So.. I'll just have hdparm use "unsigned long long" instead, to keep everything happy.

    Thanks.

     
  • Mark Lord

    Mark Lord - 2015-06-13
    • status: open --> closed-accepted
     
  • Felix Janda

    Felix Janda - 2015-06-14

    Thanks for fixing this!

    Please read http://users.suse.com/~aj/linux_lfs.html

    tl;dr, if _FILE_OFFSET_BITS=64, everything is 64bit on any system.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.