mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-19 09:15:30 +03:00
https://openfabrics.org/index.php/openfabrics-software.html OpenSM InfiniBand subnet manager
55 lines
2.1 KiB
Diff
55 lines
2.1 KiB
Diff
diff -urp opensm-3.3.20/include/complib/cl_debug_osd.h opensm-3.3.20-patched/include/complib/cl_debug_osd.h
|
|
--- opensm-3.3.20/include/complib/cl_debug_osd.h 2013-02-07 08:46:28.000000000 +0100
|
|
+++ opensm-3.3.20-patched/include/complib/cl_debug_osd.h 2016-07-05 23:33:12.674344101 +0200
|
|
@@ -42,7 +42,7 @@
|
|
#define _CL_DEBUG_OSD_H_
|
|
|
|
#include <complib/cl_types.h>
|
|
-#include <bits/wordsize.h>
|
|
+#include <limits.h>
|
|
|
|
#ifdef __cplusplus
|
|
# define BEGIN_C_DECLS extern "C" {
|
|
diff -urp opensm-3.3.20/include/complib/cl_types.h opensm-3.3.20-patched/include/complib/cl_types.h
|
|
--- opensm-3.3.20/include/complib/cl_types.h 2013-02-07 08:46:28.000000000 +0100
|
|
+++ opensm-3.3.20-patched/include/complib/cl_types.h 2016-07-05 23:33:12.674344101 +0200
|
|
@@ -55,6 +55,7 @@
|
|
|
|
BEGIN_C_DECLS
|
|
#include <complib/cl_types_osd.h>
|
|
+#include <limits.h>
|
|
#include <stddef.h>
|
|
typedef uint16_t net16_t;
|
|
typedef uint32_t net32_t;
|
|
@@ -62,16 +63,16 @@ typedef uint64_t net64_t;
|
|
|
|
/* explicit cast of void* to uint32_t */
|
|
#ifndef ASSERT_VOIDP2UINTN
|
|
-#if __WORDSIZE == 64
|
|
+#if LONG_BIT == 64
|
|
#define ASSERT_VOIDP2UINTN(var) \
|
|
CL_ASSERT( (intptr_t)var <= 0xffffffffffffffffL )
|
|
#else /* __WORDSIZE == 64 */
|
|
-#if __WORDSIZE == 32
|
|
+#if LONG_BIT == 32
|
|
/* need to cast carefully to avoid the warining of un-needed check */
|
|
#define ASSERT_VOIDP2UINTN(var) \
|
|
CL_ASSERT( (intptr_t)var <= 0x100000000ULL )
|
|
#else /* __WORDSIZE == 32 */
|
|
-#error "Need to know WORDSIZE to tell how to cast to unsigned long int"
|
|
+#error "Need to know LONG_BIT to tell how to cast to unsigned long int"
|
|
#endif /* __WORDSIZE == 32 */
|
|
#endif /* __WORDSIZE == 64 */
|
|
#endif
|
|
diff -urp opensm-3.3.20/opensm/osm_db_files.c opensm-3.3.20-patched/opensm/osm_db_files.c
|
|
--- opensm-3.3.20/opensm/osm_db_files.c 2014-10-21 13:49:50.000000000 +0200
|
|
+++ opensm-3.3.20-patched/opensm/osm_db_files.c 2016-07-05 23:33:12.664344239 +0200
|
|
@@ -415,7 +415,7 @@ int osm_db_restore(IN osm_db_domain_t *
|
|
p_accum_val);
|
|
|
|
/* check that the key is a number */
|
|
- if (!strtouq(p_key, &endptr, 0)
|
|
+ if (!strtoull(p_key, &endptr, 0)
|
|
&& *endptr != '\0') {
|
|
OSM_LOG(p_log, OSM_LOG_ERROR,
|
|
"ERR 610B: "
|