[PATCH] rpcgen: tests: Include stdint.h in test_demo.c

Michal Privoznik posted 1 patch 3 weeks, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/4bc5b9a5039105d35b74467275e5da40fc639064.1712583620.git.mprivozn@redhat.com
scripts/rpcgen/tests/test_demo.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] rpcgen: tests: Include stdint.h in test_demo.c
Posted by Michal Privoznik 3 weeks, 3 days ago
Since header file structure is a bit different on MacOS, it
doesn't get uint64_t type declaration and thus test_demo.c must
include it explicitly. This is proper solution anyway, because on
Linux we're apparently relying on the header file sneaking
through some other include.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/619
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 scripts/rpcgen/tests/test_demo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/rpcgen/tests/test_demo.c b/scripts/rpcgen/tests/test_demo.c
index ae19a674cf..e6ba7ddbc5 100644
--- a/scripts/rpcgen/tests/test_demo.c
+++ b/scripts/rpcgen/tests/test_demo.c
@@ -2,6 +2,7 @@
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 #include <stdbool.h>
+#include <stdint.h>
 
 #ifdef __APPLE__
 # define xdr_uint64_t xdr_u_int64_t
-- 
2.43.2
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [PATCH] rpcgen: tests: Include stdint.h in test_demo.c
Posted by Ján Tomko 3 weeks, 3 days ago
On a Monday in 2024, Michal Privoznik wrote:
>Since header file structure is a bit different on MacOS, it
>doesn't get uint64_t type declaration and thus test_demo.c must
>include it explicitly. This is proper solution anyway, because on
>Linux we're apparently relying on the header file sneaking
>through some other include.
>
>Resolves: https://gitlab.com/libvirt/libvirt/-/issues/619
>Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
>---
> scripts/rpcgen/tests/test_demo.c | 1 +
> 1 file changed, 1 insertion(+)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org