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 error building with -Werror #1357

Closed
MikeDombo opened this issue Jul 25, 2019 · 3 comments
Closed

_GNU_SOURCE redefined error building with -Werror #1357

MikeDombo opened this issue Jul 25, 2019 · 3 comments
Milestone

Comments

@MikeDombo
Copy link

[-Werror] config.h:19:0: error: "_GNU_SOURCE" redefined
#define _GNU_SOURCE
^

Anyone else seeing this? If so, can mosquitto add an ifndef check to not redefine it?

@ralight
Copy link
Contributor

ralight commented Jul 25, 2019

I've not seen that. What system are you compiling on?

@MikeDombo
Copy link
Author

Using GCC 4.9.4 and compiling using our own CMake files on linux x64. It goes away without the -Werror, but ideally we'd keep that. I just tried adding #ifndef around it and that does make the error go away as I expected.

@ralight
Copy link
Contributor

ralight commented Jul 25, 2019

Fair enough. I can't reproduce it, but I've added an #ifdef guard anyway.

@ralight ralight closed this as completed Jul 25, 2019
@ralight ralight added this to the 1.6.4 milestone Jul 25, 2019
vankxr pushed a commit to vankxr/mosquitto that referenced this issue Aug 9, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants