about summary refs log tree commit diff
path: root/misc/getauxval.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/getauxval.c')
-rw-r--r--misc/getauxval.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/misc/getauxval.c b/misc/getauxval.c
index e0317fd6f9..dd4c8ecab3 100644
--- a/misc/getauxval.c
+++ b/misc/getauxval.c
@@ -16,6 +16,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sys/auxv.h>
+#include <errno.h>
 #include <ldsodefs.h>
 
 
@@ -32,6 +33,8 @@ __getauxval (unsigned long int type)
   for (p = GLRO(dl_auxv); p->a_type != AT_NULL; p++)
     if (p->a_type == type)
       return p->a_un.a_val;
+
+  __set_errno (ENOENT);
   return 0;
 }