fio: update to 3.42
authorAlexandru Ardelean <redacted>
Wed, 22 Apr 2026 09:16:43 +0000 (12:16 +0300)
committerAlexandru Ardelean <redacted>
Sun, 10 May 2026 08:32:19 +0000 (11:32 +0300)
Remove <linux/prctl.h> from backend.c via Build/Prepare sed: both
<linux/prctl.h> and <sys/prctl.h> define struct prctl_mm_map in newer
musl toolchains, causing a redefinition build error. sys/prctl.h alone
provides everything fio needs.

Changelog: https://github.com/axboe/fio/blob/fio-3.42/HOWTO.rst

Signed-off-by: Alexandru Ardelean <redacted>
utils/fio/Makefile
utils/fio/test.sh [new file with mode: 0644]

index ecacd2f7128aff6e311ef7d6aa2a3abaf73d54ee..afb1d89943a6570b711d01b772b6b408de1404be 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fio
-PKG_VERSION:=3.37
+PKG_VERSION:=3.42
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://brick.kernel.dk/snaps
-PKG_HASH:=88f0fd6549ca07f7387e784a91706ab11e36d5c12ec26540f1b2d33c6f2d8327
+PKG_HASH:=ac126c69fde515a3da3f71817562715df9001e79f2008ed98a17eac340cd3f66
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=GPL-2.0-or-later
@@ -28,7 +28,7 @@ define Package/fio
   SECTION:=utils
   CATEGORY:=Utilities
   SUBMENU:=Disc
-  DEPENDS:=+libaio +zlib
+  DEPENDS:=+libaio +zlib +libatomic
   TITLE:=I/O testing and benchmarking tool
   URL:=https://github.com/axboe/fio
 endef
@@ -41,7 +41,7 @@ define Package/fio/description
 endef
 
 TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
-TARGET_LDFLAGS += -Wl,--gc-sections
+TARGET_LDFLAGS += -Wl,--gc-sections -latomic
 
 CONFIGURE_ARGS = \
        --disable-numa \
@@ -60,6 +60,11 @@ CONFIGURE_ARGS = \
        --extra-cflags="$(TARGET_CFLAGS)" \
        --prefix="$(CONFIGURE_PREFIX)"
 
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       $(SED) '/#include <linux\/prctl.h>/d' $(PKG_BUILD_DIR)/backend.c
+endef
+
 define Package/fio/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fio $(1)/usr/bin/
diff --git a/utils/fio/test.sh b/utils/fio/test.sh
new file mode 100644 (file)
index 0000000..ca27ac4
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+case "$1" in
+       fio)
+               # null ioengine discards all I/O — quick sanity check with no disk access
+               fio --name=sanity --ioengine=null --rw=randwrite --size=64k \
+                       --bs=4k --iodepth=1 --numjobs=1 2>&1 | grep -qF "sanity"
+               ;;
+esac
git clone https://git.99rst.org/PROJECT