summary refs log tree commit diff
path: root/pkgs/tools/networking/gvpe
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2017-11-15 21:33:53 +0000
committerOrivej Desh <orivej@gmx.fr>2017-11-15 21:34:47 +0000
commitf55308e7498b53dc0726fd35488a60ecd1a98648 (patch)
treecc0dfbff9690a2063ae6b145f49695faf3939a53 /pkgs/tools/networking/gvpe
parentdf0300cf674d368bab760481237f0be4d8ab3621 (diff)
downloadnixlib-f55308e7498b53dc0726fd35488a60ecd1a98648.tar
nixlib-f55308e7498b53dc0726fd35488a60ecd1a98648.tar.gz
nixlib-f55308e7498b53dc0726fd35488a60ecd1a98648.tar.bz2
nixlib-f55308e7498b53dc0726fd35488a60ecd1a98648.tar.lz
nixlib-f55308e7498b53dc0726fd35488a60ecd1a98648.tar.xz
nixlib-f55308e7498b53dc0726fd35488a60ecd1a98648.tar.zst
nixlib-f55308e7498b53dc0726fd35488a60ecd1a98648.zip
gvpe: fix build with glibc 2.26
Tracking issue: #31696
Diffstat (limited to 'pkgs/tools/networking/gvpe')
-rw-r--r--pkgs/tools/networking/gvpe/default.nix2
-rw-r--r--pkgs/tools/networking/gvpe/gvpe-3.0-glibc-2.26.patch18
2 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/tools/networking/gvpe/default.nix b/pkgs/tools/networking/gvpe/default.nix
index 6a9a34da9f8c..2317a4e2216c 100644
--- a/pkgs/tools/networking/gvpe/default.nix
+++ b/pkgs/tools/networking/gvpe/default.nix
@@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
     sha256 = "1v61mj25iyd91z0ir7cmradkkcm1ffbk52c96v293ibsvjs2s2hf";
   };
 
+  patches = [ ./gvpe-3.0-glibc-2.26.patch ];
+
   buildInputs = [ openssl gmp zlib ];
 
   configureFlags = [
diff --git a/pkgs/tools/networking/gvpe/gvpe-3.0-glibc-2.26.patch b/pkgs/tools/networking/gvpe/gvpe-3.0-glibc-2.26.patch
new file mode 100644
index 000000000000..9cfb6472c4e1
--- /dev/null
+++ b/pkgs/tools/networking/gvpe/gvpe-3.0-glibc-2.26.patch
@@ -0,0 +1,18 @@
+diff --git a/lib/getopt.h b/lib/getopt.h
+index 2d02142..5e7d8d4 100644
+--- a/lib/getopt.h
++++ b/lib/getopt.h
+@@ -101,13 +101,6 @@ struct option
+ #define optional_argument	2
+ 
+ #if defined (__STDC__) && __STDC__
+-#ifdef __GNU_LIBRARY__
+-/* Many other libraries have conflicting prototypes for getopt, with
+-   differences in the consts, in stdlib.h.  To avoid compilation
+-   errors, only prototype getopt for the GNU C library.  */
+-extern int getopt (int argc, char *const *argv, const char *shortopts);
+-#else /* not __GNU_LIBRARY__ */
+-#endif /* __GNU_LIBRARY__ */
+ extern int getopt_long (int argc, char *const *argv, const char *shortopts,
+ 		        const struct option *longopts, int *longind);
+ extern int getopt_long_only (int argc, char *const *argv,