iucode-tool: fix build
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
10
package/system/iucode-tool/patches/100_headers.patch
Normal file
10
package/system/iucode-tool/patches/100_headers.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- a/iucode_tool.c
|
||||
+++ b/iucode_tool.c
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
+#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
@@ -11,7 +11,7 @@ Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
|
||||
|
||||
--- /dev/null
|
||||
+++ b/cpuid-compat/cpuid.h
|
||||
@@ -0,0 +1,17 @@
|
||||
@@ -0,0 +1,13 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
+/*
|
||||
+ * cpuid compatibility header to build iucode-tool on non-x86 hosts
|
||||
@@ -19,10 +19,6 @@ Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
|
||||
+ * Copyright (C) 2022 Sergey V. Lobanov <sergey@lobanov.in>
|
||||
+ */
|
||||
+
|
||||
+#ifdef __APPLE__
|
||||
+# include <limits.h>
|
||||
+#endif
|
||||
+
|
||||
+static __inline int __get_cpuid (unsigned int leaf,
|
||||
+ unsigned int *eax, unsigned int *ebx,
|
||||
+ unsigned int *ecx, unsigned int *edx)
|
||||
|
||||
Reference in New Issue
Block a user