Merged
Conversation
Glibc 2.43 comes with '#define _XOPEN_SOURCE 800' which causes the
following errors:
In file included from utmp.c:31:
../../src/snoopy.h:31:10: error: '_XOPEN_SOURCE' redefined [-Werror]
31 | #define _XOPEN_SOURCE 700
| ^~~~~~~~~~~~~
In file included from /usr/include/utmp.h:21,
from utmp-snoopy.h:27,
from utmp.c:26:
/usr/include/features.h:234:10: note: this is the location of the previous definition
234 | # define _XOPEN_SOURCE 800
| ^~~~~~~~~~~~~
domain.c: In function 'snoopy_datasource_domain':
domain.c:126:17: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
126 | hashPtr = strchr(linePtr, '#');
| ^
This patch guards the '#define _XOPEN_SOURCE 700' in snoopy.h and
drops the 'const' qualifier from the variable 'linePtr' resulting in
building snoopy successfully using glibc 2.43.
Member
|
I suppose this is Debian 13 you're talking about here? Looks sane, will merge. BTW that |
bostjan
approved these changes
Mar 4, 2026
This was referenced Mar 4, 2026
Contributor
Author
Actually this issue showed up while working on Debian 14. There is no problem with Debian 13, as this is the stable release which will not see an upgrade of glibc. |
Contributor
Author
|
To be clear, this PR is/was not about the packages you provide per https://a2o.github.io/snoopy-packages/ but about snoopy being packaged in Debian, see https://packages.debian.org/forky/snoopy. In this regard it is not related to #286. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklists for Pull requests
About pull request itself:
Code quality:
(not applicable for non-code fixes)
Commits:
Licensing:
Branching:
masterbranch.masterbranch (no conflicts, I did a rebase if it was necessary).master.feature/my-shiny-new-snoopy-feature-title(for new features).bugfix/my-totally-non-hackish-workaround(for bugfixes).doc/what-i-did-to-documentation(for documentation updates).Continuous integration:
Pull request description
In Debian it was found glibc 2.43 comes with '#define _XOPEN_SOURCE 800' which causes the following errors:
In file included from utmp.c:31:
../../src/snoopy.h:31:10: error: '_XOPEN_SOURCE' redefined [-Werror]
31 | #define _XOPEN_SOURCE 700
| ^~~~~~~~~~~~~
In file included from /usr/include/utmp.h:21,
from utmp-snoopy.h:27,
from utmp.c:26:
/usr/include/features.h:234:10: note: this is the location of the previous definition
234 | # define _XOPEN_SOURCE 800
| ^~~~~~~~~~~~~
domain.c: In function 'snoopy_datasource_domain':
domain.c:126:17: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
126 | hashPtr = strchr(linePtr, '#');
| ^
This patch guards the '#define _XOPEN_SOURCE 700' in snoopy.h and drops the 'const' qualifier from the variable 'linePtr' resulting in building snoopy successfully using glibc 2.43.