makes it easy to define odp_errno to dpdk rteerrno and fixes linking issues.
Signed-off-by: Balakrishna Garapati <[email protected]> --- platform/linux-generic/Makefile.am | 1 + platform/linux-generic/include/odp_errno_define.h | 27 +++++++++++++++++++++++ platform/linux-generic/include/odp_internal.h | 3 +-- 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 platform/linux-generic/include/odp_errno_define.h diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 37835c3..5452915 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -125,6 +125,7 @@ noinst_HEADERS = \ ${srcdir}/include/odp_config_internal.h \ ${srcdir}/include/odp_crypto_internal.h \ ${srcdir}/include/odp_debug_internal.h \ + ${srcdir}/include/odp_errno_define.h \ ${srcdir}/include/odp_forward_typedefs_internal.h \ ${srcdir}/include/odp_internal.h \ ${srcdir}/include/odp_name_table_internal.h \ diff --git a/platform/linux-generic/include/odp_errno_define.h b/platform/linux-generic/include/odp_errno_define.h new file mode 100644 index 0000000..9baa7d9 --- /dev/null +++ b/platform/linux-generic/include/odp_errno_define.h @@ -0,0 +1,27 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * ODP error number define + */ + + +#ifndef ODP_ERRNO_DEFINE_H_ +#define ODP_ERRNO_DEFINE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +extern __thread int __odp_errno; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h index b313b1f..e1267cf 100644 --- a/platform/linux-generic/include/odp_internal.h +++ b/platform/linux-generic/include/odp_internal.h @@ -20,11 +20,10 @@ extern "C" { #include <odp/api/init.h> #include <odp/api/cpumask.h> #include <odp/api/thread.h> +#include <odp_errno_define.h> #include <stdio.h> #include <sys/types.h> -extern __thread int __odp_errno; - #define MAX_CPU_NUMBER 128 typedef struct { -- 1.9.1
