git: 69e8bbd3906c - main - lang/s7: fix build on big-endian architectures
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 24 Sep 2026 12:54:05 UTC
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=69e8bbd3906c5fc8fb861889349df5b4a8b21212
commit 69e8bbd3906c5fc8fb861889349df5b4a8b21212
Author: Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-09-13 20:23:22 +0000
Commit: Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-09-24 12:53:25 +0000
lang/s7: fix build on big-endian architectures
---
lang/s7/files/patch-s7.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/lang/s7/files/patch-s7.c b/lang/s7/files/patch-s7.c
new file mode 100644
index 000000000000..5e178948fb04
--- /dev/null
+++ b/lang/s7/files/patch-s7.c
@@ -0,0 +1,29 @@
+--- s7.c.orig 2026-07-07 00:00:00 UTC
++++ s7.c
+@@ -888,6 +888,18 @@
+ union {
+ s7_uint u64_type; /* type info */
+ s7_int s64_type;
++#if (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))
++ struct {
++ uint8_t type_pad[7];
++ uint8_t type_field;
++ };
++ struct {
++ uint16_t high_bits;
++ uint16_t opt_bits;
++ uint16_t mid_bits;
++ uint16_t low_bits;
++ } bits;
++#else
+ uint8_t type_field;
+ struct {
+ uint16_t low_bits; /* 8 bits for type (type_field above, pair?/string? etc, 6 bits in use), 8 flag bits */
+@@ -895,6 +907,7 @@
+ uint16_t opt_bits; /* 16 bits for opcode (eval choice), 10 in use) */
+ uint16_t high_bits; /* 16 more flag bits */
+ } bits;
++#endif
+ } tf;
+ union {
+