diff --git a/libraries/AP_HAL_Linux/Util.cpp b/libraries/AP_HAL_Linux/Util.cpp index bfceab6dcd..d25bc87a3d 100644 --- a/libraries/AP_HAL_Linux/Util.cpp +++ b/libraries/AP_HAL_Linux/Util.cpp @@ -241,7 +241,7 @@ int Util::get_hw_arm32() return -ENOENT; } -#ifdef ENABLE_HEAP +#if ENABLE_HEAP void *Util::allocate_heap_memory(size_t size) { struct heap *new_heap = (struct heap*)malloc(sizeof(struct heap)); diff --git a/libraries/AP_HAL_Linux/Util.h b/libraries/AP_HAL_Linux/Util.h index 70faada85b..11a29dacb3 100644 --- a/libraries/AP_HAL_Linux/Util.h +++ b/libraries/AP_HAL_Linux/Util.h @@ -71,7 +71,7 @@ public: bool get_system_id(char buf[50]) override; bool get_system_id_unformatted(uint8_t buf[], uint8_t &len) override; -#ifdef ENABLE_HEAP +#if ENABLE_HEAP // heap functions, note that a heap once alloc'd cannot be dealloc'd virtual void *allocate_heap_memory(size_t size) override; virtual void *heap_realloc(void *h, void *ptr, size_t old_size, size_t new_size) override; @@ -116,7 +116,7 @@ private: const char *custom_defaults = HAL_PARAM_DEFAULTS_PATH; static const char *_hw_names[UTIL_NUM_HARDWARES]; -#ifdef ENABLE_HEAP +#if ENABLE_HEAP struct heap_allocation_header { size_t allocation_size; // size of allocated block, not including this header };