From 18f51b343b17d0ce70b271a3c6a832ab9cf9028a Mon Sep 17 00:00:00 2001
From: Alam Ed Arias <alam@srb2.org>
Date: Fri, 25 Mar 2016 20:37:14 -0400
Subject: [PATCH] build: more mac fixes

---
 .travis.yml  | 2 ++
 src/md5.c    | 2 +-
 src/string.c | 4 ++++
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index c7e8b66b0..e781c46e3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,7 +4,9 @@ dist: trusty
 
 os:
   - linux
+    env: CFLAGS=-Wno-absolute-value -Werror
   - osx
+    env: CFLAGS=--Werror
 
 env:
 - CFLAGS=-Wno-absolute-value -Wno-unknown-warning-option -Werror
diff --git a/src/md5.c b/src/md5.c
index aeaac2cde..ba89c499b 100644
--- a/src/md5.c
+++ b/src/md5.c
@@ -36,7 +36,7 @@
  #include <stdlib.h>
 #else
  #ifndef HAVE_MEMCPY
-  #if !((defined (_WIN32) || defined (_WIN32_WCE)) && !defined (__CYGWIN__))
+  #if !((defined (_WIN32) || defined (_WIN32_WCE)) && !defined (__CYGWIN__)) && !defined (__APPLE__)
    #define memcpy(d, s, n) bcopy ((s), (d), (n))
   #endif
  #endif
diff --git a/src/string.c b/src/string.c
index 436757309..19540547c 100644
--- a/src/string.c
+++ b/src/string.c
@@ -15,6 +15,8 @@
 #include <string.h>
 #include "doomdef.h"
 
+#if !defined (__APPLE__)
+
 // Like the OpenBSD version, but it doesn't check for src not being a valid
 // C string.
 size_t strlcat(char *dst, const char *src, size_t siz)
@@ -46,3 +48,5 @@ size_t strlcpy(char *dst, const char *src, size_t siz)
 	dst[0] = '\0';
 	return strlcat(dst, src, siz);
 }
+
+#endif
-- 
GitLab