200_add-cpuid-compatibility-header-to-build-on-non-x86.patch 894 B

12345678910111213141516171819202122232425262728293031
  1. From a21e75da32c0016f1575ea29775565934a67660d Mon Sep 17 00:00:00 2001
  2. From: "Sergey V. Lobanov" <[email protected]>
  3. Date: Sat, 5 Feb 2022 13:10:23 +0300
  4. Subject: [PATCH] Add cpuid compatibility header to build on non-x86 hosts
  5. Signed-off-by: Sergey V. Lobanov <[email protected]>
  6. ---
  7. cpuid-compat/cpuid.h | 17 +++++++++++++++++
  8. 1 file changed, 17 insertions(+)
  9. create mode 100644 cpuid-compat/cpuid.h
  10. --- /dev/null
  11. +++ b/cpuid-compat/cpuid.h
  12. @@ -0,0 +1,17 @@
  13. +// SPDX-License-Identifier: GPL-2.0-or-later
  14. +/*
  15. + * cpuid compatibility header to build iucode-tool on non-x86 hosts
  16. + *
  17. + * Copyright (C) 2022 Sergey V. Lobanov <[email protected]>
  18. + */
  19. +
  20. +#ifdef __APPLE__
  21. +# include <limits.h>
  22. +#endif
  23. +
  24. +static __inline int __get_cpuid (unsigned int leaf,
  25. + unsigned int *eax, unsigned int *ebx,
  26. + unsigned int *ecx, unsigned int *edx)
  27. +{
  28. + return 0;
  29. +}