Check if STACK is defined before using the stack(9).

PR: 227446
Reported by: emaste
Approved by: ken
This commit is contained in:
ram 2018-04-13 13:31:20 +00:00
parent d610cb72d0
commit ac3c4d667a

View File

@ -37,6 +37,7 @@
*/
#include "ocs.h"
#include "opt_stack.h"
#include <sys/sysctl.h>
#include <sys/malloc.h>
#include <sys/linker.h> /* for debug of memory allocations */
@ -855,11 +856,13 @@ void ocs_intr_enable(ocs_os_handle_t os)
void ocs_print_stack(void)
{
#if defined(STACK)
struct stack st;
stack_zero(&st);
stack_save(&st);
stack_print(&st);
#endif
}
void ocs_abort(void)