summaryrefslogtreecommitdiff
path: root/devel/librfuncs/patches/patch-aa
blob: a4c563bebf2b2b2eecfb554b19f67dcead9390e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$NetBSD: patch-aa,v 1.1 2006/03/01 15:58:03 drochner Exp $

--- src/getenv_r.c.orig	2006-03-01 16:06:43.000000000 +0100
+++ src/getenv_r.c
@@ -39,7 +39,8 @@ int getenv_r(const char *name, char *get
     if (envList == NULL)
     {
         /* The string name was not found in the environment. */
-        retVal = ENOENT;
+        errno = ENOENT;
+	retVal = -1;
     }
     else
     {
@@ -50,7 +51,8 @@ int getenv_r(const char *name, char *get
              Insufficient storage was supplied via getenvbuf and buflen to 
              contain the value for the specified name.
             */ 
-            retVal = ERANGE;
+            errno = ERANGE;
+	    retVal = -1;
         }
         else
         {