forked from ibm-openbmc/libpldm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
msgbuf: Ensure memmem() is correctly typed and visible where required
To ensure memmem() is visible _GNU_SOURCE needs to be defined early, at least before any system headers are included. Define it in the build flags as clang-tidy will re-order includes based on vibes rather than dependencies. Finally, clean up the remaining compiler warnings by dropping the unnecessary casts. Note that _GNU_SOURCE implies _DEFAULT_SOURCE, so we drop the latter: > Since glibc 2.19, defining _GNU_SOURCE also has the effect of > implicitly defining _DEFAULT_SOURCE. Before glibc 2.20, defining > _GNU_SOURCE also had the effect of implicitly defining _BSD_SOURCE > and _SVID_SOURCE. https://www.man7.org/linux/man-pages/man7/feature_test_macros.7.html Fixes: ibm-openbmc#12 Fixes: 1523778 ("msgbuf: Add pldm_msgbuf_span_string_utf16()") Change-Id: I9206f7616740790a89366762cce11d3045471b97 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
- Loading branch information
1 parent
5eb11bf
commit 9896762
Showing
4 changed files
with
5 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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