All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] multipath-tools test: add missing include for stdint.h
@ 2025-07-21 17:28 Funda Wang
  2025-07-21 20:39 ` Benjamin Marzinski
  0 siblings, 1 reply; 2+ messages in thread
From: Funda Wang @ 2025-07-21 17:28 UTC (permalink / raw)
  To: dm-devel; +Cc: bmarzins, mwilck


[-- Attachment #1.1: Type: text/plain, Size: 1425 bytes --]

When building multipath-tools with cmocka 1.1.8. it produces following
error when make test:

In file included from test-log.c:6:
test-log.c: In function '__wrap_dlog':
test-log.c:24:20: error: 'uintptr_t' undeclared (first use in this function)
   24 |         expected = mock_ptr_type(char *);
      |                    ^~~~~~~~~~~~~
test-log.c:10:1: note: 'uintptr_t' is defined in header '<stdint.h>'; did
you forget to '#include <stdint.h>'?
    9 | #include "debug.h"
  +++ |+#include <stdint.h>
   10 |
test-log.c:24:20: note: each undeclared identifier is reported only once
for each function it appears in
   24 |         expected = mock_ptr_type(char *);
      |                    ^~~~~~~~~~~~~
test-log.c:24:20: error: expected ')' before '_mock'
   24 |         expected = mock_ptr_type(char *);
      |                    ^~~~~~~~~~~~~
test-log.c:24:20: note: to match this '('
   24 |         expected = mock_ptr_type(char *);
      |                    ^~~~~~~~~~~~~
make[1]: *** [Makefile:74: test-log.o] Error 1
rm parser.o.wrap dmevents.o.wrap hwtable.o.wrap uevent.o.wrap
blacklist.o.wrap util.o.wrap
make[1]: Leaving directory
'/home/lkp/rpmbuild/BUILD/multipath-tools-0.9.5/tests'
make: *** [Makefile:121: test] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.7qc9Bd (%check)

The attached patch solved this issue. Thanks.

GitHub pull request: https://github.com/opensvc/multipath-tools/pull/117

[-- Attachment #1.2: Type: text/html, Size: 1834 bytes --]

[-- Attachment #2: multipath-tools-add-missing-include-for-cmocka.patch --]
[-- Type: application/octet-stream, Size: 569 bytes --]

From 10e1010bfc7f683ddac6680f33491c6b59a1841f Mon Sep 17 00:00:00 2001
From: Funda Wang <fundawang@yeah.net>
Date: Mon, 21 Jul 2025 11:26:08 +0800
Subject: [PATCH] multipath-tools test: add missing include for stdint.h

---
 tests/test-log.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/test-log.c b/tests/test-log.c
index 635169994..4f6699568 100644
--- a/tests/test-log.c
+++ b/tests/test-log.c
@@ -2,6 +2,7 @@
 #include <stddef.h>
 #include <stdarg.h>
 #include <stdio.h>
+#include <stdint.h>
 #include <string.h>
 #include <cmocka.h>
 #include "log.h"

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-21 20:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-21 17:28 [PATCH] multipath-tools test: add missing include for stdint.h Funda Wang
2025-07-21 20:39 ` Benjamin Marzinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.