mirror of
https://git.freebsd.org/ports.git
synced 2025-06-08 06:10:30 -04:00
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
17 lines
370 B
C
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
|
|
*/
|