/**
 * @file       errno.c
 * @brief      errno implementation for Kinibi ASN1
 * @author     Ivan Vorobiov (i.vorobiov@samsung.com)
 * @version    1.0
 * @date       Created Sep 5, 2019
 * @copyright  In Samsung Ukraine R&D Center (SURC) under a contract between
 * @copyright  LLC "Samsung Electronics Ukraine Company" (Kiev, Ukraine) and
 * @copyright  "Samsung Electronics Co", Ltd (Seoul, Republic of Korea)
 * @copyright  Copyright: (c) Samsung Electronics Co, Ltd 2019. All rights reserved.
**/
#include <errno.h>

static int _errno;

/**
 * @note       ASN1 is built with llvm compiler and newlib, but this library may be
 *             used with ARM DS-5 compiler also. So we should provide own __errno()
**/
__attribute__((weak)) int *__errno(void) {
  return &_errno;
}
