[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
secure_getenv declaration error
From: |
John W. Eaton |
Subject: |
secure_getenv declaration error |
Date: |
Sat, 9 Feb 2013 15:09:01 -0500 |
After updating gnulib in the Octave sources, I started seeing the
following error:
In file included from /usr/include/c++/4.7/cstdlib:66:0,
from /usr/include/c++/4.7/bits/stl_algo.h:61,
from /usr/include/c++/4.7/algorithm:63,
from /home/jwe/src/octave/liboctave/array/Array.h:32,
from /home/jwe/src/octave/liboctave/array/Array-ch.cc:29:
../libgnu/stdlib.h:1098:1: error: invalid conversion from 'char* (*)(const
char*)' to 'int (*)(const char*)' [-fpermissive]
The attached patch fixes the problem for me.
jwe
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -773,7 +773,7 @@
_GL_FUNCDECL_SYS (secure_getenv, char *,
(char const *name) _GL_ARG_NONNULL ((1)));
# endif
-_GL_CXXALIAS_SYS (secure_getenv, int, (char const *name));
+_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name));
_GL_CXXALIASWARN (secure_getenv);
#elif defined GNULIB_POSIXCHECK
# undef secure_getenv
- secure_getenv declaration error,
John W. Eaton <=