1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-12 03:00:28 +00:00

Fix build on FreeBSD 10

This commit is contained in:
Baptiste Daroussin 2017-01-21 13:46:35 +00:00
parent 4fbb730f60
commit c7b155b84e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=432036
2 changed files with 21 additions and 1 deletions

View File

@ -1,4 +1,4 @@
--- Makefile.orig 2017-01-19 23:17:59 UTC
--- Makefile.orig 2017-01-20 14:49:54 UTC
+++ Makefile
@@ -21,7 +21,7 @@ LIBDIR = $(PREFIX)/lib
INCLUDEDIR = $(PREFIX)/include

View File

@ -0,0 +1,20 @@
--- xmalloc.c.orig 2017-01-20 14:49:54 UTC
+++ xmalloc.c
@@ -14,6 +14,8 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/param.h>
+
#include <err.h>
#include <stdarg.h>
#include <stdint.h>
@@ -64,7 +66,7 @@ void *
xreallocarray(void *p, size_t nm, size_t sz)
{
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(__OpenBSD__) || (defined(__FreeBSD__) && __FreeBSD_version > 1100071)
if ((p = reallocarray(p, nm, sz)) == NULL)
err(EXIT_FAILURE, NULL);
#else