From 562ef5e69eb38230810bd25a4335224a31bfe31b Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 27 Oct 2020 10:42:10 +0100 Subject: misc: Add internal __getauxval2 function The explicit error return value (without in-band signaling) avoids complicated steps to detect errors based on whether errno has been updated. Reviewed-by: Alistair Francis --- include/sys/auxv.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/sys/auxv.h b/include/sys/auxv.h index 3bab6d0..dd0602b 100644 --- a/include/sys/auxv.h +++ b/include/sys/auxv.h @@ -5,4 +5,9 @@ extern __typeof (getauxval) __getauxval; libc_hidden_proto (__getauxval) +/* Like getauxval, but writes the value to *RESULT and returns true if + found, or returns false. Does not set errno. */ +_Bool __getauxval2 (unsigned long int type, unsigned long int *result); +libc_hidden_proto (__getauxval2) + #endif /* !_ISOMAC */ -- cgit v1.1