Skip to content

Conversation

@marv7000
Copy link
Contributor

@marv7000 marv7000 commented May 9, 2025

This PR fixes an issue with loff_t not being found on Linux using the mlibc environment.
This happens because smbiosHelper.c relies on loff_t being included by sys/stat.h or sys/mman.h, but its manpage says this is provided by sys/types.h

@CarterLi CarterLi requested a review from Copilot May 10, 2025 02:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue on Linux using the mlibc environment by explicitly including the header that defines loff_t.

  • Adds #include <sys/types.h> in smbiosHelper.c to provide the loff_t definition.

Comment on lines 57 to +58
#include <sys/stat.h>
#include <sys/types.h>
Copy link

Copilot AI May 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider moving #include <sys/types.h> before #include <sys/stat.h> to ensure that all types required by subsequent headers are defined early, in line with common best practices.

Suggested change
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/types.h>
#include <sys/stat.h>

Copilot uses AI. Check for mistakes.
@CarterLi CarterLi merged commit a96a9fc into fastfetch-cli:dev May 10, 2025
18 checks passed
@marv7000 marv7000 deleted the fix-include branch May 10, 2025 13:11
@marv7000 marv7000 restored the fix-include branch May 22, 2025 16:54
@marv7000 marv7000 deleted the fix-include branch May 22, 2025 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants