mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
CryptoPkg/CrtLibSupport: add secure_getenv() stub function
The Fedora distro ships a modified OpenSSL 1.1.0 package stream. One of their patches calls the secure_getenv() C library function. We already have a stub for getenv(); it applies trivially to secure_getenv() as well. Add the secure_getenv() stub so that edk2 can be built with Fedora's OpenSSL 1.1.0 sources. Cc: Qin Long <qin.long@intel.com> Cc: Ting Ye <ting.ye@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Long Qin <qin.long@intel.com>
This commit is contained in:
parent
d9476a7ef1
commit
ee3198e672
CryptoPkg/Library
@ -361,6 +361,19 @@ char *getenv (const char *varname)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Get a value from the current environment */
|
||||
char *secure_getenv (const char *varname)
|
||||
{
|
||||
//
|
||||
// Null secure_getenv() function implementation to satisfy the linker, since
|
||||
// there is no direct functionality logic dependency in present UEFI cases.
|
||||
//
|
||||
// From the secure_getenv() manual: 'just like getenv() except that it
|
||||
// returns NULL in cases where "secure execution" is required'.
|
||||
//
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//
|
||||
// -- Stream I/O Routines --
|
||||
//
|
||||
|
@ -163,6 +163,7 @@ gid_t getgid (void);
|
||||
gid_t getegid (void);
|
||||
void qsort (void *, size_t, size_t, int (*)(const void *, const void *));
|
||||
char *getenv (const char *);
|
||||
char *secure_getenv (const char *);
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 2)
|
||||
void abort (void) __attribute__((__noreturn__));
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user