Ticket #7343: 0001-Only-use-unsetenv-if-HAVE_UNSETENV-is-defined-fixes-.patch

File 0001-Only-use-unsetenv-if-HAVE_UNSETENV-is-defined-fixes-.patch, 854 bytes (added by SimonHengel, 18 months ago)
  • cbits/HsUnix.c

    From f85741162f972f593e4e276e839cb4c80fa266cd Mon Sep 17 00:00:00 2001
    From: Simon Hengel <sol@typeful.net>
    Date: Thu, 18 Oct 2012 00:40:19 +0200
    Subject: [PATCH] Only use unsetenv if HAVE_UNSETENV is defined (fixes #7343)
    
    ---
     cbits/HsUnix.c |    2 ++
     1 file changed, 2 insertions(+)
    
    diff --git a/cbits/HsUnix.c b/cbits/HsUnix.c
    index dd4b4f6..aba5445 100644
    a b int __hscore_setrlimit(int resource, struct rlimit *rlim) { 
    157157} 
    158158#endif 
    159159 
     160#ifdef HAVE_UNSETENV 
    160161int __hsunix_unsetenv(const char *name) 
    161162{ 
    162163#ifdef UNSETENV_RETURNS_VOID 
    int __hsunix_unsetenv(const char *name) 
    166167    return unsetenv(name); 
    167168#endif 
    168169} 
     170#endif 
    169171 
    170172/* A size that will contain many path names, but not necessarily all 
    171173 * (PATH_MAX is not defined on systems with unlimited path length,