sighdl: include stddef header file#2808
Merged
igaw merged 1 commit intolinux-nvme:masterfrom May 14, 2025
Merged
Conversation
igaw
reviewed
May 12, 2025
| // Get log | ||
|
|
||
| struct smart_log_add log = {0}; | ||
| struct smart_log_add log = {{{{{0}}}}}; |
Collaborator
There was a problem hiding this comment.
Uff, this looks rather unusual. If this is really necessary because the compiler on CentOS can't handle this type of initialization, I suggest we rather use memset for this case.
Contributor
Author
There was a problem hiding this comment.
Changed to use memset as mentioned. Thank you.
eab5877 to
5c131e5
Compare
Contributor
Author
|
The NULL definition error caused on Cent OS stream release 9. [48/166] compiling c nvme.p/plugins/ocp/ocp-hardware-component-log.c.o
samu: job failed with status 1: gcc -std=gnu99 -g -Og -Wall -fdiagnostics-color=always -fomit-frame-pointer -D_GNU_SOURCE -include config.h -I . -I .. -I ccan -I ../ccan -I subprojects/libnvme/src -I ../subprojects/libnvme/src -MD -MQ nvme.p/util/sighdl.c.o -MF nvme.p/util/sighdl.c.o.d -o nvme.p/util/sighdl.c.o -c ../util/sighdl.c
../util/sighdl.c: 関数 ‘nvme_install_sigint_handler’ 内:
../util/sighdl.c:23:30: エラー: ‘NULL’ が宣言されていません (この関数内での最初の使用)
if (sigaction(SIGINT, &act, NULL) == -1)
^~~~
../util/sighdl.c:23:30: 備考: ‘NULL’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
../util/sighdl.c:6:1:
+#include <stddef.h>
../util/sighdl.c:23:30:
if (sigaction(SIGINT, &act, NULL) == -1)
^~~~
../util/sighdl.c:23:30: 備考: 未宣言の識別子は出現した各関数内で一回のみ報告されます
samu: subcommand failed |
Collaborator
|
I'd say drop the second patch (CentOS 7, 8 are EOL). CentOS Stream 9 is alive. |
The header file required for the muon build on CentOS. Signed-off-by: Tokunori Ikegami <[email protected]>
5c131e5 to
b670e36
Compare
Contributor
Author
|
I see so just dropped the second patch. Thank you. |
Collaborator
|
Thanks! |
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.
The header file required for the muon build on CentOS.