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

_GNU_SOURCE redefined #24575

Open
kczulko opened this issue Dec 27, 2024 · 0 comments
Open

_GNU_SOURCE redefined #24575

kczulko opened this issue Dec 27, 2024 · 0 comments

Comments

@kczulko
Copy link

kczulko commented Dec 27, 2024

Hello,

While working on rules_nim I've noticed the following redefinition

needle: pointer, needlelen: csize_t): pointer {.importc, header: """#define _GNU_SOURCE

in the build output log:

INFO: From Compiling src/rules_nim_nimble_gen_cc_files_only/@m..@s..@s..@s..@sexternal@srules_nim~~nim~nim_linux_x64@slib@spure@sstrutils.nim.c:
bazel-out/k8-fastbuild/bin/src/rules_nim_nimble_gen_cc_files_only/@m..@s..@s..@s..@sexternal@srules_nim~~nim~nim_linux_x64@slib@spure@sstrutils.nim.c:6: warning: "_GNU_SOURCE" redefined
    6 | #define _GNU_SOURCE
      |
In file included from bazel-out/k8-fastbuild/bin/src/rules_nim_nimble_gen_cc_files_only/@m..@s..@s..@s..@sexternal@srules_nim~~nim~nim_linux_x64@slib@spure@sstrutils.nim.c:4:
external/rules_nim~~nim~nim_linux_x64/lib/nimbase.h:78: note: this is the location of the previous definition
   78 | #  define _GNU_SOURCE 1
      |

Can I add #ifndef around it?

Best regards,
Karol

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

No branches or pull requests

1 participant