ports/sysutils/squashfs-tools/files/patch-action.c
Mathieu Arnold 320514f1dd It seems some people keep adding $FreeBSD$ to patch files.
Patches must not be changed by the vcs, this includes the
svn:keyword expansion.  Set fbsd:nokeywords to a couple of patches.

With hat:	portmgr
Sponsored by:	Absolight
2015-09-16 13:03:45 +00:00

17 lines
370 B
C

Hack for lack of strdupa() in BSD libc
--- action.c.orig
+++ action.c
@@ -44,6 +44,12 @@
#include "action.h"
#include "error.h"
+#ifndef strdupa
+#include <string.h> // required for str*()
+#include <stdlib.h> // required for alloca
+#define strdupa(foo) (strncpy( alloca( strlen(foo) + 1 ), foo, strlen( foo ) + 1 ))
+#endif
+
/*
* code to parse actions
*/