aboutsummaryrefslogtreecommitdiffstats
path: root/testing/opensm/0001-musl-fixes.patch
blob: 4fdf8d5101692dc87b4785c63d0db5153f3d4718 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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: "