mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
netperf: fix build
This commit is contained in:
parent
2fa4a65baa
commit
06b694840c
2 changed files with 29 additions and 1 deletions
28
srcpkgs/netperf/patches/include.patch
Normal file
28
srcpkgs/netperf/patches/include.patch
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
--- a/src/net_uuid.c
|
||||||
|
+++ b/src/net_uuid.c
|
||||||
|
@@ -28,6 +28,7 @@
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
|
||||||
|
#if defined(HAVE_INTTYPES_H)
|
||||||
|
#include <inttypes.h>
|
||||||
|
--- a/src/netlib.c
|
||||||
|
+++ b/src/netlib.c
|
||||||
|
@@ -779,6 +779,7 @@ random_ip_address(struct addrinfo *res,
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(HAVE_SENDFILE)
|
||||||
|
+#include <sys/sendfile.h>
|
||||||
|
int netperf_sendfile(SOCKET send_socket, struct ring_elt *send_ring) {
|
||||||
|
|
||||||
|
int len;
|
||||||
|
@@ -2309,6 +2310,7 @@ bind_to_specific_processor(int processor
|
||||||
|
value will not tell you if you are bound vs unbound. */
|
||||||
|
bindprocessor(BINDPROCESS,getpid(),(cpu_t)mapped_affinity);
|
||||||
|
#elif HAVE_SCHED_SETAFFINITY
|
||||||
|
+#define _GNU_SOURCE
|
||||||
|
#include <sched.h>
|
||||||
|
/* in theory this should cover systems with more CPUs than bits in a
|
||||||
|
long, without having to specify __USE_GNU. we "cheat" by taking
|
|
@ -11,7 +11,7 @@ distfiles="https://github.com/HewlettPackard/netperf/archive/netperf-${version}.
|
||||||
checksum=4569bafa4cca3d548eb96a486755af40bd9ceb6ab7c6abd81cc6aa4875007c4e
|
checksum=4569bafa4cca3d548eb96a486755af40bd9ceb6ab7c6abd81cc6aa4875007c4e
|
||||||
repository=nonfree
|
repository=nonfree
|
||||||
|
|
||||||
CFLAGS="-fcommon"
|
CFLAGS="-D_GNU_SOURCE -fcommon"
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
vlicense COPYING
|
vlicense COPYING
|
||||||
|
|
Loading…
Add table
Reference in a new issue