[BACK]Return to patch-libraries_unix_cbits_execvpe.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / lang / ghc7 / patches

File: [cvs.NetBSD.org] / pkgsrc / lang / ghc7 / patches / Attic / patch-libraries_unix_cbits_execvpe.c (download)

Revision 1.1, Fri Oct 23 20:46:22 2015 UTC (4 years, 8 months ago) by tnn
Branch: MAIN
CVS Tags: pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4

Don't conflict with system's execvpe(3). Fixes build on NetBSD-current.

$NetBSD: patch-libraries_unix_cbits_execvpe.c,v 1.1 2015/10/23 20:46:22 tnn Exp $

Don't conflict with builtin execvpe(3).

--- libraries/unix/cbits/execvpe.c.orig	2013-04-18 21:36:40.000000000 +0000
+++ libraries/unix/cbits/execvpe.c
@@ -57,8 +57,22 @@
  * SUCH DAMAGE.
  */
 
+#ifdef __NetBSD__
+#  include <sys/param.h>
+#  if __NetBSD_Version__ > 799000000
+#    define HAVE_EXECVPE 1
+#  endif
+#elif defined(__GLIBC__)
+#  define HAVE_EXECVPE 1
+#endif
+
+#ifdef HAVE_EXECVPE
+static int
+unused_execvpe(char *name, char *const argv[], char **envp)
+#else
 int
 execvpe(char *name, char *const argv[], char **envp)
+#endif /* HAVE_EXECVPE */
 {
     register int lp, ln;
     register char *p;