diff options
author | tnn <tnn> | 2015-10-23 20:46:22 +0000 |
---|---|---|
committer | tnn <tnn> | 2015-10-23 20:46:22 +0000 |
commit | 2a89d4395c415b180a12fab52225fc61389d5ed0 (patch) | |
tree | f30699f817a73a255afc9cdb650cb59ffd17ef4b | |
parent | 619c531e61db878e37583bcff491821474534580 (diff) | |
download | pkgsrc-2a89d4395c415b180a12fab52225fc61389d5ed0.tar.gz |
Don't conflict with system's execvpe(3). Fixes build on NetBSD-current.
-rw-r--r-- | lang/ghc7/distinfo | 4 | ||||
-rw-r--r-- | lang/ghc7/patches/patch-libraries_unix_cbits_execvpe.c | 29 | ||||
-rw-r--r-- | lang/ghc7/patches/patch-libraries_unix_include_execvpe.h | 27 |
3 files changed, 59 insertions, 1 deletions
diff --git a/lang/ghc7/distinfo b/lang/ghc7/distinfo index 373c1ee4e2d..7ba4bf34864 100644 --- a/lang/ghc7/distinfo +++ b/lang/ghc7/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.11 2015/02/16 07:04:58 pho Exp $ +$NetBSD: distinfo,v 1.12 2015/10/23 20:46:22 tnn Exp $ SHA1 (ghc-7.6.3-boot-i386-unknown-freebsd.tar.xz) = aea6224f30aa52d9998f2c77f473902179f03b8c RMD160 (ghc-7.6.3-boot-i386-unknown-freebsd.tar.xz) = 39a588cac4a0411db45ef269fbe6a63c6cb428ee @@ -21,6 +21,8 @@ SHA1 (patch-libraries_integer-simple_GHC_Integer_Type.hs) = b3140e169726f78f6d3b SHA1 (patch-libraries_time_Data_Time_Clock_CTimeval.hs) = acc2a2255f53fbe55d91004f9d843ae249dad206 SHA1 (patch-libraries_unix_System_Posix_Files.hsc) = f2e0892f9ebb9d82ddaf71b014d9af33967848dc SHA1 (patch-libraries_unix_System_Posix_Signals.hsc) = 3fbb8cff53b342dd69efa186ad8b86718a101a79 +SHA1 (patch-libraries_unix_cbits_execvpe.c) = 7e1464f9db0839221252a5328c170248fe21e727 +SHA1 (patch-libraries_unix_include_execvpe.h) = 4c48b72f74d360e925528ecce95baa8a2ae923d7 SHA1 (patch-mk_config.mk.in) = 90a156f6c455d4b2c5d10fdf65b3a170dcfc4892 SHA1 (patch-rts_Linker.c) = 39d1ca7a856a3ec25e493e97832ef255562c0719 SHA1 (patch-rts_StgCRun.c) = 5d4010dc250af25db0b5b2717c510752f4813e73 diff --git a/lang/ghc7/patches/patch-libraries_unix_cbits_execvpe.c b/lang/ghc7/patches/patch-libraries_unix_cbits_execvpe.c new file mode 100644 index 00000000000..d8d27e40ebf --- /dev/null +++ b/lang/ghc7/patches/patch-libraries_unix_cbits_execvpe.c @@ -0,0 +1,29 @@ +$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; diff --git a/lang/ghc7/patches/patch-libraries_unix_include_execvpe.h b/lang/ghc7/patches/patch-libraries_unix_include_execvpe.h new file mode 100644 index 00000000000..f374fdb2765 --- /dev/null +++ b/lang/ghc7/patches/patch-libraries_unix_include_execvpe.h @@ -0,0 +1,27 @@ +$NetBSD: patch-libraries_unix_include_execvpe.h,v 1.1 2015/10/23 20:46:22 tnn Exp $ + +Don't conflict with builtin execvpe(3). + +--- libraries/unix/include/execvpe.h.orig 2013-04-18 21:36:40.000000000 +0000 ++++ libraries/unix/include/execvpe.h +@@ -19,7 +19,19 @@ + #endif + + #if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_WIN32) ++#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 ++#include <unistd.h> ++#else + extern int execvpe(char *name, char *const argv[], char **envp); + extern void pPrPr_disableITimers (void); ++#endif /* HAVE_EXECVPE */ + #endif +- |