Skip to content

sighdl: include stddef header file#2808

Merged
igaw merged 1 commit intolinux-nvme:masterfrom
ikegami-t:sighdl-stddef-null
May 14, 2025
Merged

sighdl: include stddef header file#2808
igaw merged 1 commit intolinux-nvme:masterfrom
ikegami-t:sighdl-stddef-null

Conversation

@ikegami-t
Copy link
Copy Markdown
Contributor

The header file required for the muon build on CentOS.

Comment thread plugins/memblaze/memblaze-nvme.c Outdated
// Get log

struct smart_log_add log = {0};
struct smart_log_add log = {{{{{0}}}}};
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to use memset as mentioned. Thank you.

@ikegami-t ikegami-t force-pushed the sighdl-stddef-null branch from eab5877 to 5c131e5 Compare May 12, 2025 22:56
@ikegami-t
Copy link
Copy Markdown
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

@igaw
Copy link
Copy Markdown
Collaborator

igaw commented May 14, 2025

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]>
@ikegami-t ikegami-t force-pushed the sighdl-stddef-null branch from 5c131e5 to b670e36 Compare May 14, 2025 14:23
@ikegami-t
Copy link
Copy Markdown
Contributor Author

I see so just dropped the second patch. Thank you.

@igaw igaw merged commit 27b6d48 into linux-nvme:master May 14, 2025
17 checks passed
@igaw
Copy link
Copy Markdown
Collaborator

igaw commented May 14, 2025

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants