From f68e0aa7d1b39a46e039a8c3b7bc8cca4ae7e86c Mon Sep 17 00:00:00 2001 From: Kvetoslav Belda Date: Fri, 18 Apr 2014 16:20:27 +0200 Subject: [PATCH] Use correct header file for alloca for Linux build. --- sfAnalogInput.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/sfAnalogInput.c b/sfAnalogInput.c index fdc1722..69572f5 100644 --- a/sfAnalogInput.c +++ b/sfAnalogInput.c @@ -47,26 +47,27 @@ #include "simstruc.h" #include -#include #ifndef WITHOUT_HW #include "mf624_SIMULINK.h" #endif /*WITHOUT_HW*/ - #ifdef __GNUC__ - #define my_popcount __builtin_popcount - #else - int my_popcount(uint32_t patt) - { - int pops = 0; - while (patt) { - if (patt & 1) - pops++; - patt >>= 1; - } - return pops; +#ifdef __GNUC__ + #include + #define my_popcount __builtin_popcount +#else + #include + int my_popcount(uint32_t patt) + { + int pops = 0; + while (patt) { + if (patt & 1) + pops++; + patt >>= 1; } - #endif + return pops; + } +#endif /* Error handling -- 2.39.2