From 06b694840c6378e6d6097b670f479b15eb2eeb5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Wed, 12 Jun 2024 20:34:59 +0700 Subject: [PATCH] netperf: fix build --- srcpkgs/netperf/patches/include.patch | 28 +++++++++++++++++++++++++++ srcpkgs/netperf/template | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/netperf/patches/include.patch diff --git a/srcpkgs/netperf/patches/include.patch b/srcpkgs/netperf/patches/include.patch new file mode 100644 index 00000000000..209260302a2 --- /dev/null +++ b/srcpkgs/netperf/patches/include.patch @@ -0,0 +1,28 @@ +--- a/src/net_uuid.c ++++ b/src/net_uuid.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #if defined(HAVE_INTTYPES_H) + #include +--- a/src/netlib.c ++++ b/src/netlib.c +@@ -779,6 +779,7 @@ random_ip_address(struct addrinfo *res, + } + + #if defined(HAVE_SENDFILE) ++#include + 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 + /* in theory this should cover systems with more CPUs than bits in a + long, without having to specify __USE_GNU. we "cheat" by taking diff --git a/srcpkgs/netperf/template b/srcpkgs/netperf/template index 3d7bc656262..89d608b96c1 100644 --- a/srcpkgs/netperf/template +++ b/srcpkgs/netperf/template @@ -11,7 +11,7 @@ distfiles="https://github.com/HewlettPackard/netperf/archive/netperf-${version}. checksum=4569bafa4cca3d548eb96a486755af40bd9ceb6ab7c6abd81cc6aa4875007c4e repository=nonfree -CFLAGS="-fcommon" +CFLAGS="-D_GNU_SOURCE -fcommon" post_install() { vlicense COPYING