diff --git a/headers/compatibility/gnu/string.h b/headers/compatibility/gnu/string.h deleted file mode 100644 index deedcb4193..0000000000 --- a/headers/compatibility/gnu/string.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2018 Haiku, Inc. All Rights Reserved. - * Distributed under the terms of the MIT License. - */ -#ifndef _GNU_STRING_H_ -#define _GNU_STRING_H_ - - -#include_next -#include - - -#ifdef _DEFAULT_SOURCE - - -#ifdef __cplusplus -extern "C" { -#endif - -extern void *memmem(const void *source, size_t sourceLength, - const void *search, size_t searchLength); - -#ifdef __cplusplus -} -#endif - - -#endif - - -#endif /* _GNU_STRING_H_ */ diff --git a/headers/posix/string.h b/headers/posix/string.h index 79931fd834..7fa188f315 100644 --- a/headers/posix/string.h +++ b/headers/posix/string.h @@ -22,6 +22,8 @@ extern void *memcpy(void *dest, const void *source, size_t length); extern void *memccpy(void *dest, const void *source, int stopByte, size_t length); extern void *memmove(void *dest, const void *source, size_t length); extern void *memset(void *dest, int value, size_t length); +extern void *memmem(const void *source, size_t sourceLength, + const void *search, size_t searchLength); #ifdef _DEFAULT_SOURCE extern void *memrchr(const void *source, int value, size_t length); diff --git a/src/libs/gnu/Jamfile b/src/libs/gnu/Jamfile index d506f3d55e..386de68895 100644 --- a/src/libs/gnu/Jamfile +++ b/src/libs/gnu/Jamfile @@ -17,7 +17,6 @@ for architectureObject in [ MultiArchSubDirSetup ] { SharedLibrary [ MultiArchDefaultGristFiles libgnu.so ] : crypt.cpp - memmem.c qsort.c sched_affinity.cpp sched_getcpu.cpp diff --git a/src/system/libroot/posix/string/Jamfile b/src/system/libroot/posix/string/Jamfile index 4f67a2c887..ffcfd72545 100644 --- a/src/system/libroot/posix/string/Jamfile +++ b/src/system/libroot/posix/string/Jamfile @@ -23,6 +23,7 @@ for architectureObject in [ MultiArchSubDirSetup ] { memccpy.c memchr.c memcmp.c + memmem.c memmove.c stpcpy.c strcasecmp.c diff --git a/src/libs/gnu/memmem.c b/src/system/libroot/posix/string/memmem.c similarity index 100% rename from src/libs/gnu/memmem.c rename to src/system/libroot/posix/string/memmem.c