[DTrace-devel] [PATCH] test: Fix access to kernel variable
Eugene Loh
eugene.loh at oracle.com
Thu Aug 1 17:42:46 UTC 2024
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
On 8/1/24 12:54, Kris Van Hees wrote:
> On systems with kernels that do not provide CTF, access to some kernel
> variables requires an explicit &-operator.
>
> Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
> ---
> test/unittest/funcs/tst.inet_ntoa_nonDPTR.d | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/test/unittest/funcs/tst.inet_ntoa_nonDPTR.d b/test/unittest/funcs/tst.inet_ntoa_nonDPTR.d
> index c2e5f59a..500c53e8 100644
> --- a/test/unittest/funcs/tst.inet_ntoa_nonDPTR.d
> +++ b/test/unittest/funcs/tst.inet_ntoa_nonDPTR.d
> @@ -1,6 +1,6 @@
> /*
> * Oracle Linux DTrace.
> - * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
> * Licensed under the Universal Permissive License v 1.0 as shown at
> * http://oss.oracle.com/licenses/upl.
> */
> @@ -11,7 +11,7 @@
> BEGIN
> {
> /* "Linu" will be 76.105.110.117 */
> - printf("%s\n", inet_ntoa((ipaddr_t *)`linux_banner));
> + printf("%s\n", inet_ntoa((ipaddr_t *)&`linux_banner));
> exit(0);
> }
>
More information about the DTrace-devel
mailing list