Browse Source

Merge pull request #7151 from neheb/fio

fio: Update to 3.11
lilik-openwrt-22.03
Hannu Nyman 6 years ago
committed by GitHub
parent
commit
74c3517fe1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 79 additions and 3 deletions
  1. +3
    -3
      utils/fio/Makefile
  2. +76
    -0
      utils/fio/patches/010-Add-Musl-support.patch

+ 3
- 3
utils/fio/Makefile View File

@ -8,14 +8,14 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=fio PKG_NAME:=fio
PKG_VERSION:=3.10
PKG_VERSION:=3.11
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE_URL:=http://brick.kernel.dk/snaps PKG_SOURCE_URL:=http://brick.kernel.dk/snaps
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_HASH:=21150f1ac0b8d70f1b435a090221305b4e89ea17db3a313274d96b90b40dafcf
PKG_HASH:=4aab4f81e443f554f7526ff8f3a026ab78afc7e40049ba6050dac8f219071569
PKG_MAINTAINER:=Dragan Stancevic <ds@codeminutia.com>
PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
PKG_LICENSE:=GPL-2.0+ PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING PKG_LICENSE_FILES:=COPYING


+ 76
- 0
utils/fio/patches/010-Add-Musl-support.patch View File

@ -0,0 +1,76 @@
From 2759b7c8dda77641fe271102a26ad7a02419ad62 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Sun, 16 Sep 2018 11:07:14 -0700
Subject: [PATCH] Add Musl support
The *48_r functions are glibc extensions that also happen to be supported
by uclibc as well. Adapted from the Android solution.
__USE_FILE_OFFSET64 is glibc specific so use LARGEFILE_SOURCE.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
os/os-linux.h | 17 +++++++++++++++++
oslib/libmtd_common.h | 2 +-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/os/os-linux.h b/os/os-linux.h
index 6b63d123..e06aadae 100644
--- a/os/os-linux.h
+++ b/os/os-linux.h
@@ -60,7 +60,11 @@
typedef cpu_set_t os_cpu_mask_t;
+#if defined(__GLIBC__) || defined(__UCLIBC__)
typedef struct drand48_data os_random_state_t;
+#else
+typedef struct { unsigned short r[3]; } os_random_state_t;
+#endif
#ifdef CONFIG_3ARG_AFFINITY
#define fio_setaffinity(pid, cpumask) \
@@ -172,14 +176,27 @@ static inline unsigned long long os_phys_mem(void)
static inline void os_random_seed(unsigned long seed, os_random_state_t *rs)
{
+#if defined(__GLIBC__) || defined (__UCLIBC__)
srand48_r(seed, rs);
+#else
+ rs->r[0] = seed & 0xffff;
+ seed >>= 16;
+ rs->r[1] = seed & 0xffff;
+ seed >>= 16;
+ rs->r[2] = seed & 0xffff;
+ seed48(rs->r);
+#endif
}
static inline long os_random_long(os_random_state_t *rs)
{
long val;
+#if defined(__GLIBC__) || (__UCLIBC__)
lrand48_r(rs, &val);
+#else
+ val = nrand48(rs->r);
+#endif
return val;
}
diff --git a/oslib/libmtd_common.h b/oslib/libmtd_common.h
index 4ed9f0ba..c5cfd217 100644
--- a/oslib/libmtd_common.h
+++ b/oslib/libmtd_common.h
@@ -69,7 +69,7 @@ extern "C" {
#endif
/* define a print format specifier for off_t */
-#ifdef __USE_FILE_OFFSET64
+#ifdef _LARGEFILE_SOURCE
#define PRIxoff_t PRIx64
#define PRIdoff_t PRId64
#else
--
2.19.1

Loading…
Cancel
Save