فهرست منبع

Check alloca.h presence

Ref #35
Jean-Baptiste Kempf 9 سال پیش
والد
کامیت
e65934e433
2فایلهای تغییر یافته به همراه5 افزوده شده و 3 حذف شده
  1. 1 2
      configure.ac
  2. 4 1
      src/smb_buffer.c

+ 1 - 2
configure.ac

@@ -91,8 +91,7 @@ AC_SEARCH_LIBS([clock_gettime], [rt])
 AC_REPLACE_FUNCS([strlcpy])
 AC_REPLACE_FUNCS([clock_gettime])
 
-AC_CHECK_HEADERS([bsd/string.h])
-AC_CHECK_HEADERS([langinfo.h])
+AC_CHECK_HEADERS([bsd/string.h langinfo.h alloca.h])
 
 ## Configure random device path
 AC_ARG_WITH([urandom], 

+ 4 - 1
src/smb_buffer.c

@@ -28,10 +28,13 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#include <alloca.h>
 #include <assert.h>
 #include <stdlib.h>
 
+#ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+#endif
+
 #include "smb_buffer.h"
 
 void    smb_buffer_init(smb_buffer *buf, void *data, size_t size)