Skip to content

Commit

Permalink
gvpe: fix build with glibc 2.26
Browse files Browse the repository at this point in the history
Tracking issue: #31696
  • Loading branch information
orivej committed Nov 15, 2017
1 parent df0300c commit f55308e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/tools/networking/gvpe/default.nix
Expand Up @@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
sha256 = "1v61mj25iyd91z0ir7cmradkkcm1ffbk52c96v293ibsvjs2s2hf";
};

patches = [ ./gvpe-3.0-glibc-2.26.patch ];

buildInputs = [ openssl gmp zlib ];

configureFlags = [
Expand Down
18 changes: 18 additions & 0 deletions 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,

0 comments on commit f55308e

Please sign in to comment.