Closed justinkb closed 4 months ago
How do you define which version of linbx is used for compilation? The change breaks the build with an older version. The code should be able to do both.
@eku I'm pretty sure it's just assumed in the switch homebrew scene that you will use the latest available libnx from devkitpro, and if not, you're on your own. I don't see any defines in the libnx includes that would allow a C preprocessor to determine the libnx version easily. I may be wrong though
It appears the structure affected changed with an October commit to libnx. libnx started autodetecting the bsdsockets version with this commit, which breaks the code at issue here.
I agree with the conclusion @justinkb came to being unable to use the preprocessor directives (specifically, no defines). There are five pages of results, but none of them refer to a preprocessor directive referring to the library version.
This is fixed in the cmake branch which will eventually be merged
I can confirm when making the same change with my copy of the repo that it compiles. It appears that libnx has removed the bsdsockets_version field, so setting that field causes an compile-time failure.