mirror of git://git.musl-libc.org/musl
add secure_getenv function
This function is a GNU extension introduced in glibc 2.17.
This commit is contained in:
parent
0847902ab9
commit
7844ecb590
|
@ -152,6 +152,7 @@ int ptsname_r(int, char *, size_t);
|
|||
char *ecvt(double, int, int *, int *);
|
||||
char *fcvt(double, int, int *, int *);
|
||||
char *gcvt(double, int, char *);
|
||||
char *secure_getenv(const char *);
|
||||
struct __locale_struct;
|
||||
float strtof_l(const char *__restrict, char **__restrict, struct __locale_struct *);
|
||||
double strtod_l(const char *__restrict, char **__restrict, struct __locale_struct *);
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
#define _GNU_SOURCE
|
||||
#include <stdlib.h>
|
||||
#include "libc.h"
|
||||
|
||||
char *secure_getenv(const char *name)
|
||||
{
|
||||
return libc.secure ? NULL : getenv(name);
|
||||
}
|
Loading…
Reference in New Issue