[DTrace-devel] [PATCH] test: Fix access to kernel variable

Kris Van Hees kris.van.hees at oracle.com
Thu Aug 1 16:54:19 UTC 2024


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);
 }
 
-- 
2.45.2




More information about the DTrace-devel mailing list