Skip to content
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

Specify return type of main() in conftest.c #268

Merged
merged 1 commit into from
Dec 31, 2024

Conversation

kanjitalk755
Copy link
Contributor

This PR fixes following error while building on macOS.

error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
main(){return(0);}
^

@@ -711,7 +711,7 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
#line 713 "configure"
#include "confdefs.h"
main(){return(0);}
int main(){return(0);}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is C code, right? Not C++? If so, specify the function arguments:

Suggested change
int main(){return(0);}
int main(void){return(0);}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's right.
However, there also are thousands of this description in other configure files.
The purpose of this PR is to make the minimum fix to be able to build on macOS, and I don't intend to fix thousands of things.

@IoIxD
Copy link
Contributor

IoIxD commented Dec 31, 2024

It's not just MacOS, this is now required to build on Fedora Linux and Arch. That said, I applied this PR myself and confirmed this is functioning.

@autc04 autc04 merged commit 3672e5e into autc04:master Dec 31, 2024
9 checks passed
@kanjitalk755 kanjitalk755 deleted the fix_for_c99 branch December 31, 2024 06:09
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.

4 participants