void-packages/srcpkgs/opensm/patches/fix-musl.patch

42 lines
1.1 KiB
Diff

diff --git include/complib/cl_debug_osd.h include/complib/cl_debug_osd.h
index 31d6972..4506504 100644
--- include/complib/cl_debug_osd.h
+++ include/complib/cl_debug_osd.h
@@ -42,7 +42,7 @@
#define _CL_DEBUG_OSD_H_
#include <complib/cl_types.h>
-#include <bits/wordsize.h>
+#include <stdint.h>
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
diff --git include/complib/cl_types.h include/complib/cl_types.h
index a773e51..a94ea2e 100644
--- include/complib/cl_types.h
+++ include/complib/cl_types.h
@@ -56,6 +56,9 @@
BEGIN_C_DECLS
#include <complib/cl_types_osd.h>
#include <stddef.h>
+#ifndef __GLIBC__
+#include <bits/reg.h>
+#endif
typedef uint16_t net16_t;
typedef uint32_t net32_t;
typedef uint64_t net64_t;
diff --git opensm/osm_db_files.c opensm/osm_db_files.c
index fd9f2fe..8ac6b7b 100644
--- opensm/osm_db_files.c
+++ opensm/osm_db_files.c
@@ -415,7 +415,7 @@ int osm_db_restore(IN osm_db_domain_t * p_domain)
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: "