1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:07:45 +00:00

Ports: Fix building the stress-ng port

This commit is contained in:
Gunnar Beutner 2021-04-13 03:31:10 +02:00 committed by Andreas Kling
parent e83caffccc
commit 341b44b6f7
2 changed files with 66 additions and 13 deletions

View file

@ -2,4 +2,9 @@
port=stress-ng port=stress-ng
version=0.11.23 version=0.11.23
files="https://github.com/ColinIanKing/stress-ng/archive/V${version}.tar.gz stress-ng-${version}.tar.gz" files="https://github.com/ColinIanKing/stress-ng/archive/V${version}.tar.gz stress-ng-${version}.tar.gz"
makeopts="STATIC=1 LDFLAGS=-L${SERENITY_BUILD_DIR}/Root/usr/local/lib" depends=zlib
pre_configure() {
export CFLAGS="-I${SERENITY_BUILD_DIR}/Root/usr/local/include"
export LDFLAGS="-L${SERENITY_BUILD_DIR}/Root/usr/local/lib -lzlib"
}

View file

@ -276,21 +276,14 @@ diff -ur a/stress-ng.h b/stress-ng.h
#include <setjmp.h> #include <setjmp.h>
#include <signal.h> #include <signal.h>
#include <stdarg.h> #include <stdarg.h>
@@ -1093,14 +1092,6 @@ @@ -1092,6 +1092,7 @@
#define PACKED #define PACKED
#endif #endif
-/* force inlining hint */ +#undef ALWAYS_INLINE
-#if defined(__GNUC__) && NEED_GNUC(3,4,0) /* or possibly earlier */ \ /* force inlining hint */
- && ((!defined(__s390__) && !defined(__s390x__)) || NEED_GNUC(6,0,1)) #if defined(__GNUC__) && NEED_GNUC(3,4,0) /* or possibly earlier */ \
-#define ALWAYS_INLINE __attribute__ ((always_inline)) && ((!defined(__s390__) && !defined(__s390x__)) || NEED_GNUC(6,0,1))
-#else
-#define ALWAYS_INLINE
-#endif
-
/* force no inlining hint */
#if defined(__GNUC__) && NEED_GNUC(3,4,0) /* or possibly earier */
#define NOINLINE __attribute__ ((noinline))
@@ -2230,7 +2221,6 @@ @@ -2230,7 +2221,6 @@
uint64_t timeout[STRESS_PROCS_MAX]; /* Shared futex timeouts */ uint64_t timeout[STRESS_PROCS_MAX]; /* Shared futex timeouts */
} futex; } futex;
@ -579,3 +572,58 @@ iff -ur a/stress-schedpolicy.c b/stress-schedpolicy.c
#if defined(SCHED_RR) #if defined(SCHED_RR)
case SCHED_RR: case SCHED_RR:
diff -Naur stress-ng-0.11.23/core-net.c stress-ng-0.11.23.serenity/core-net.c
--- stress-ng-0.11.23/core-net.c 2021-04-13 03:20:49.389317525 +0200
+++ stress-ng-0.11.23.serenity/core-net.c 2021-04-13 03:21:42.786948162 +0200
@@ -114,6 +114,7 @@
break;
}
#endif
+#ifndef __serenity__
#if defined(AF_INET6)
case AF_INET6: {
static struct sockaddr_in6 addr;
@@ -138,6 +139,7 @@
break;
}
#endif
+#endif
#if defined(AF_UNIX)
case AF_UNIX: {
static struct sockaddr_un addr;
@@ -176,6 +178,7 @@
break;
}
#endif
+#ifndef __serenity__
#if defined(AF_INET6)
case AF_INET6: {
struct sockaddr_in6 *addr = (struct sockaddr_in6 *)sockaddr;
@@ -183,6 +186,7 @@
break;
}
#endif
+#endif
#if defined(AF_UNIX)
case AF_UNIX:
break;
diff -Naur stress-ng-0.11.23/stress-zlib.c stress-ng-0.11.23.serenity/stress-zlib.c
--- stress-ng-0.11.23/stress-zlib.c 2021-04-13 03:29:29.112182330 +0200
+++ stress-ng-0.11.23.serenity/stress-zlib.c 2021-04-13 03:28:52.128162386 +0200
@@ -698,14 +698,14 @@
register int i;
if (UNLIKELY(!seeded)) {
- srand48(stress_mwc32());
+ srand(stress_mwc32());
seeded = true;
}
(void)args;
for (i = 0; i < n; i++, data++)
- *data = lrand48();
+ *data = rand();
}
/*