mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 12:07:51 +00:00
fixes #24575
(cherry picked from commit ce6a34597d)
This commit is contained in:
@@ -2009,7 +2009,9 @@ func find*(s: string, chars: set[char], start: Natural = 0, last = -1): int {.
|
||||
|
||||
when defined(linux):
|
||||
proc memmem(haystack: pointer, haystacklen: csize_t,
|
||||
needle: pointer, needlelen: csize_t): pointer {.importc, header: """#define _GNU_SOURCE
|
||||
needle: pointer, needlelen: csize_t): pointer {.importc, header: """#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#include <string.h>""".}
|
||||
elif defined(bsd) or (defined(macosx) and not defined(ios)):
|
||||
proc memmem(haystack: pointer, haystacklen: csize_t,
|
||||
|
||||
Reference in New Issue
Block a user