diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-07-25 20:55:46 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-07-25 20:55:46 +0000 |
commit | a934de6e105ff9542bc026647e363ec852524fe0 (patch) | |
tree | 153e04dd605808f9c2aba9f339bd270b848db920 /user | |
parent | 49b7f1e70c388c353116b1ddd1097a83d1cf8574 (diff) | |
download | packages-a934de6e105ff9542bc026647e363ec852524fe0.tar.gz packages-a934de6e105ff9542bc026647e363ec852524fe0.tar.bz2 packages-a934de6e105ff9542bc026647e363ec852524fe0.tar.xz packages-a934de6e105ff9542bc026647e363ec852524fe0.zip |
user/vde2: fix build on 32-bit platforms with GCC >6
Diffstat (limited to 'user')
-rw-r--r-- | user/vde2/APKBUILD | 8 | ||||
-rw-r--r-- | user/vde2/gcc8.patch | 44 |
2 files changed, 47 insertions, 5 deletions
diff --git a/user/vde2/APKBUILD b/user/vde2/APKBUILD index 037c4cd22..b89403bcc 100644 --- a/user/vde2/APKBUILD +++ b/user/vde2/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: pkgname=vde2 pkgver=2.3.2 -pkgrel=9 +pkgrel=10 pkgdesc="Virtual Distributed Ethernet - User mode networking for QEMU et al" url="http://vde.sourceforge.net/" arch="all" @@ -12,20 +12,18 @@ makedepends="linux-headers libpcap-dev openssl-dev python3-dev" subpackages="$pkgname-doc $pkgname-dev $pkgname-libs" install="vde2.pre-install" source="http://downloads.sourceforge.net/project/vde/vde2/$pkgver/vde2-$pkgver.tar.gz + gcc8.patch musl-build-fix.patch vde2.pre-up vde2.post-down " prepare() { - cd "$builddir" default_prepare - update_config_sub } build() { - cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -37,7 +35,6 @@ build() { } package() { - cd "$builddir" make -j1 DESTDIR="$pkgdir" install install -Dm755 "$srcdir"/vde2.pre-up \ @@ -53,6 +50,7 @@ libs() { } sha512sums="b502ceac8eebd30694a25d913c1d321b58ec8ae97dec0b09acc40455f7a97c05040ff395242c144580a9d9d5cb19292055bc94133ea1bde66bfdab40844533a8 vde2-2.3.2.tar.gz +abf09ff1f96998b48225dd0b0bb69b72c3c2cbaa3faa96048977083f0a8c72b16f052a71da22c6fb0712dbad531c5fda6f6e5abeea41c8f33edba2bf5a702dc3 gcc8.patch 52d02c3a5a4f5526ed2e653e5720f012501215c0440e26105c585ea0501423da04047f6bad13a71b7378397a9d9274b191007d839876b675e206ed5be0f25372 musl-build-fix.patch 71b29d538bba80b881f239d683215279089c14e8feec05bf27c159ead51094cdfb168281900fa4527f588c624e8f7687df8d3f79377e07d13ad64de613177df3 vde2.pre-up d1cf18146145dbe608842c694b05d2906e36553b0ba3fa1ec2e53dbf06027b9e4937ea61aee77c1ccbb73b818f19d55787051eb6d5b09a38c7d18a1dad629190 vde2.post-down" diff --git a/user/vde2/gcc8.patch b/user/vde2/gcc8.patch new file mode 100644 index 000000000..0dbe083d0 --- /dev/null +++ b/user/vde2/gcc8.patch @@ -0,0 +1,44 @@ +From 67bc8443ac7e8144a78d84dee30a5cac3b5c99a4 Mon Sep 17 00:00:00 2001 +From: Romain Naour <romain.naour@gmail.com> +Date: Sun, 27 Aug 2017 23:56:05 +0200 +Subject: [PATCH] fstp: Add static to inline functions + +From [1] +"This is needed to avoid a link error where the inline functions appear +missing at link time. +From c99 standard inline function should either be declared static or +have an extern instance in a c file for linking. +This fix is necessary to build with gcc 7; for some reason it was not +trigerred before." + +[1] https://git.buildroot.net/buildroot/commit/?id=21133ada326c87627f7bdee4493d8086587c3cca + +Signed-off-by: Romain Naour <romain.naour@gmail.com> +--- + src/vde_switch/fstp.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/vde_switch/fstp.c b/src/vde_switch/fstp.c +index aab7324..b1e7ee8 100644 +--- a/src/vde_switch/fstp.c ++++ b/src/vde_switch/fstp.c +@@ -30,14 +30,14 @@ static int numports; + #ifdef FSTP + #include <fstp.h> + /*********************** sending macro used by FSTP & Core ******************/ +-void inline ltonstring(unsigned long l,unsigned char *s) { ++static void inline ltonstring(unsigned long l,unsigned char *s) { + s[3]=l; l>>=8; + s[2]=l; l>>=8; + s[1]=l; l>>=8; + s[0]=l; + } + +-unsigned long inline nstringtol(unsigned char *s) { ++static unsigned long inline nstringtol(unsigned char *s) { + return (s[0]<<24)+(s[1]<<16)+(s[2]<<8)+s[3]; + } + +-- +2.9.5 + |