--- /dev/null
+diff -ur glusterfs-10.5.orig/libglusterfs/src/gf-io-legacy.c glusterfs-10.5/libglusterfs/src/gf-io-legacy.c
+--- glusterfs-10.5.orig/libglusterfs/src/gf-io-legacy.c 2023-11-14 15:03:34.000000000 +0000
++++ glusterfs-10.5/libglusterfs/src/gf-io-legacy.c 2025-04-20 13:16:07.787544191 +0000
+@@ -45,7 +45,11 @@
+ {
+ uint64_t seq;
+
++#ifdef __LP64__
+ seq = uatomic_add_return(&gf_io_legacy_seq, 1) - 1;
++#else
++ seq = __atomic_fetch_add(&gf_io_legacy_seq, 1, __ATOMIC_SEQ_CST);
++#endif
+
+ gf_io_cbk(NULL, seq, id, res);
+ }
+diff -ur glusterfs-10.5.orig/libglusterfs/src/gf-io-uring.c glusterfs-10.5/libglusterfs/src/gf-io-uring.c
+--- glusterfs-10.5.orig/libglusterfs/src/gf-io-uring.c 2023-11-14 15:03:34.000000000 +0000
++++ glusterfs-10.5/libglusterfs/src/gf-io-uring.c 2025-04-20 13:17:10.011727047 +0000
+@@ -668,7 +668,11 @@
+ idx = tail & gf_io_uring.sq.mask;
+ nr = gf_io_uring_sq_length(idx);
+ if (nr != 0) {
++#ifdef __LP64__
+ nr = (uint32_t)uatomic_xchg(&gf_io_uring.sq.sqes[idx].__pad2[2], 0);
++#else
++ nr = (uint32_t)__atomic_exchange_n(&gf_io_uring.sq.sqes[idx].__pad2[2], 0, __ATOMIC_SEQ_CST);
++#endif
+ }
+
+ return nr;
+diff -ur glusterfs-10.5.orig/libglusterfs/src/glusterfs/gf-io.h glusterfs-10.5/libglusterfs/src/glusterfs/gf-io.h
+--- glusterfs-10.5.orig/libglusterfs/src/glusterfs/gf-io.h 2023-11-14 15:03:34.000000000 +0000
++++ glusterfs-10.5/libglusterfs/src/glusterfs/gf-io.h 2025-04-20 13:16:07.787544191 +0000
+@@ -358,7 +358,11 @@
+ static inline uint64_t
+ gf_io_reserve(uint32_t nr)
+ {
++#ifdef __LP64__
+ return uatomic_add_return(&gf_io.op_seq, nr) - nr;
++#else
++ return __atomic_fetch_add(&gf_io.op_seq, nr, __ATOMIC_SEQ_CST);
++#endif
+ }
+
+ /* Wait for a particular entry in gf_io.data_map to be available. */
--- /dev/null
+--- glusterfs-10.3/libglusterfs/src/glusterfs/compat-io_uring.h.orig 2022-09-20 12:24:29.627820825 +0200
++++ glusterfs-10.3/libglusterfs/src/glusterfs/compat-io_uring.h 2023-03-17 21:47:37.793704259 +0100
+@@ -11,6 +11,8 @@
+ #ifndef __COMPAT_IO_URING_H__
+ #define __COMPAT_IO_URING_H__
+
++#include <sys/mount.h>
++#define _LINUX_MOUNT_H
+ #include <linux/io_uring.h>
+
+ /* io_uring setup flags. */
Summary(pl.UTF-8): Klastrowy system przechowywania plików skalujący się do petabajtów
Name: glusterfs
Version: 10.5
-Release: 1
+Release: 2
License: LGPL v3+ or GPL v2 (libraries), GPL v3+ (programs)
Group: Applications/System
Source0: https://download.gluster.org/pub/gluster/glusterfs/10/%{version}/glusterfs-%{version}.tar.gz
Source1: glusterfsd.init
Patch0: ssl_paths.patch
Patch1: ksh_getopts.patch
+Patch2: %{name}-glibc.patch
+Patch3: %{name}-atomic32.patch
URL: https://www.gluster.org/
BuildRequires: acl-devel
BuildRequires: autoconf >= 2.50
%prep
%setup -q
-%patch0 -p1
-%patch1 -p1
+%patch -P0 -p1
+%patch -P1 -p1
+%patch -P2 -p1
+%patch -P3 -p1
%build
%{__libtoolize}