vpcs: fix build with glibc 2.26

Tracking issue: #31696
This commit is contained in:
Orivej Desh 2017-11-16 12:30:14 +00:00
parent 2318223380
commit 41e0d4b68d
2 changed files with 20 additions and 5 deletions

View File

@ -6,26 +6,27 @@ stdenv.mkDerivation rec {
version = "0.8";
src = fetchurl {
name = "${name}.tar.bz2";
url = "mirror://sourceforge/project/${pname}/${version}/${name}-src.tbz";
sha256 = "14y9nflcyq486vvw0na0fkfmg5dac004qb332v4m5a0vaz8059nw";
};
unpackCmd = "tar -xjf $src";
patches = [ ./vpcs-0.8-glibc-2.26.patch ];
buildInputs = [ glibc.static ];
buildPhase = ''
buildPhase = ''(
cd src
./mk.sh ${buildPlatform.platform.kernelArch}
'';
)'';
installPhase = ''
cd ..
install -D -m555 src/vpcs $out/bin/vpcs;
install -D -m444 man/vpcs.1 $out/share/man/man1/vpcs.1;
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "Virtual PC simulator";
longDescription = ''

View File

@ -0,0 +1,14 @@
diff --git a/src/getopt.h b/src/getopt.h
index 4394aa2..bf59e10 100644
--- a/src/getopt.h
+++ b/src/getopt.h
@@ -49,9 +49,6 @@ extern int optind;
extern int opterr;
extern int optopt;
-#ifndef FreeBSD
-int getopt(int argc, char** argv, char* optstr);
-#endif
int arg_to_int(const char* arg, int min, int max, int defalt);
#ifdef __cplusplus