summaryrefslogtreecommitdiff
path: root/sysutils/scanmem/files/patch-common.h
blob: 99e55ac377fe47c3bfc95c13859b9b092545802a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- common.h.orig	2017-10-13 21:53:16 UTC
+++ common.h
@@ -28,7 +28,9 @@
 
 /* from string.h in glibc for Android/BSD */
 #ifndef strdupa
+# ifdef HAVE_ALLOCA_H
 # include <alloca.h>
+# endif
 # include <string.h>
 # define strdupa(s)                                                           \
     ({                                                                        \
@@ -40,7 +42,9 @@
 #endif
 
 #ifndef strndupa
+# ifdef HAVE_ALLOCA_H
 # include <alloca.h>
+# endif
 # include <string.h>
 # define strndupa(s, n)                                                       \
     ({                                                                        \