[MacPorts] #71657: fastfetch @2.29.0 build error: error: 'FAT_CIGAM_64' undeclared (first use in this function); did you mean 'MH_CIGAM_64'?
MacPorts
noreply at macports.org
Sat Dec 28 22:58:30 UTC 2024
#71657: fastfetch @2.29.0 build error: error: 'FAT_CIGAM_64' undeclared (first use
in this function); did you mean 'MH_CIGAM_64'?
---------------------------+-------------------------
Reporter: barracuda156 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.10.5
Resolution: | Keywords: snowleopard
Port: fastfetch |
---------------------------+-------------------------
Comment (by barracuda156):
I kinda wonder how it compiles on 10a190, since Apple `fat.h` misses those
includes there (and in fact in several later macOS versions as well).
Anyway, FWIW, this fixes the build and produces a working app on 10.6.8:
{{{
--- a/src/util/binary_apple.c
+++ b/src/util/binary_apple.c
@@ -10,6 +10,13 @@
#include <mach-o/swap.h>
#include <mach-o/fat.h>
+#ifndef FAT_MAGIC_64
+#define FAT_MAGIC_64 0xcafebabf
+#endif
+#ifndef FAT_CIGAM_64
+#define FAT_CIGAM_64 0xbfbafeca
+#endif
+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" //
swap_fat_arch
// Ref: https://github.com/AlexDenisov/segment_dumper/blob/master/main.c
}}}
The `binary_apple.c` code should be reviewed with regard to BE still.
--
Ticket URL: <https://trac.macports.org/ticket/71657#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list