diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2025-04-24 12:06:05 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2025-07-17 14:45:20 +0000 |
commit | 2a36117d7af2632d15df624074ac650798c247d6 (patch) | |
tree | 241e79fc51079ae7b048861ab41cb568632600dd | |
parent | e9bac26203da4b945ff2365c590edfd9accb80cc (diff) | |
download | edk2-2a36117d7af2632d15df624074ac650798c247d6.zip edk2-2a36117d7af2632d15df624074ac650798c247d6.tar.gz edk2-2a36117d7af2632d15df624074ac650798c247d6.tar.bz2 |
CryptoPkg/CrtLib: add strpbrk implementation
Needed by openssl-3.5.1.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r-- | CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c | 19 | ||||
-rw-r--r-- | CryptoPkg/Library/Include/CrtLibSupport.h | 6 |
2 files changed, 25 insertions, 0 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c index 8046ef9..8a8fdfe 100644 --- a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c +++ b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c @@ -425,6 +425,25 @@ strtoul ( return 0;
}
+char *
+strpbrk (
+ const char *s,
+ const char *accept
+ )
+{
+ int i;
+
+ for ( ; *s != '\0'; s++) {
+ for (i = 0; accept[i] != '\0'; i++) {
+ if (*s == accept[i]) {
+ return (char *)s;
+ }
+ }
+ }
+
+ return NULL;
+}
+
/* Convert character to lowercase */
int
tolower (
diff --git a/CryptoPkg/Library/Include/CrtLibSupport.h b/CryptoPkg/Library/Include/CrtLibSupport.h index b43bfd4..9fdffed 100644 --- a/CryptoPkg/Library/Include/CrtLibSupport.h +++ b/CryptoPkg/Library/Include/CrtLibSupport.h @@ -426,6 +426,12 @@ strcat ( const char *strSource
);
+char *
+strpbrk (
+ const char *s,
+ const char *accept
+ );
+
//
// Macros that directly map functions to BaseLib, BaseMemoryLib, and DebugLib functions
//
|