]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - misc/getauxval.c
Add error reporting (via errno) to getauxval().
[thirdparty/glibc.git] / misc / getauxval.c
index e0317fd6f9a089d8abbf9d767d9f07d4c488ae38..dd4c8ecab32283a6c7a40272c4bc94c29861fda8 100644 (file)
@@ -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;
 }