[Chapel Merge] Add ifndef's around GNU_SOURCE #defines

Branch: refs/heads/main
Revision: 98f6f7b
Author: e-kayrakli
Link: Unavailable
Log Message:

Merge pull request #18972 from e-kayrakli/protect-gnu-source

Add ifndef's around GNU_SOURCE #defines

I bumped into issues building Chapel because of redefined _GNU_SOURCEs.
This PR prevents that by adding ifndefs.

The issue likely started with Split bundled and system -I and -L arguments by mppf · Pull Request #18880 · chapel-lang/chapel · GitHub.

[Reviewed by @mppf]

Modified Files:
M runtime/src/chplsys.c

M runtime/src/error.c

Compare: https://github.com/chapel-lang/chapel/compare/f9c86a93c8ef...98f6f7b662e9