Skip to content

Instantly share code, notes, and snippets.

Created October 20, 2017 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/fc0372dedcc2b3e966dfc882528fb4a3 to your computer and use it in GitHub Desktop.
Save anonymous/fc0372dedcc2b3e966dfc882528fb4a3 to your computer and use it in GitHub Desktop.
diff --git a/src/platform/memmem.h b/src/platform/memmem.h
index 0d0bb18..128d0a2 100644
--- a/src/platform/memmem.h
+++ b/src/platform/memmem.h
@@ -3,9 +3,10 @@
* Crochemore-Perrin two-way string matching.
* Reasoning:
* Windows, does not include any native memmem
- * MacOS has a memmem but is slower and originates from FreeBSD dated to 2005 */
+ * MacOS has a memmem but is slower and originates from FreeBSD dated to 2005
+ * Solaris doesn't seem to have memmem */
-#if defined(_WIN32) || defined(__APPLE__) || defined(__Darwin__)
+#if defined(_WIN32) || defined(__APPLE__) || defined(__Darwin__) || defined(__sun)
#include "../3rdparty/freebsd/memmem.c"
#else
/* On systems that use glibc, you must define _GNU_SOURCE before including string.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment